HI all,
I am using Entity Framework and ASP.NET MVC 3. In one part of the app, I have a self -referencing relationship in a table (ID, ParentID, etc…) This table also has a Status field. When a user updates a Status, it needs to update the statuses of all of it’s children. The depth is variable.
I’m looking to do this without using the Load() function as I heard that is not efficient. I also came across a way to do it with a stored procedure, but I want this functionality to be done in EF and ideally just in the POST action.
Answer is solved in this post:
Changes Cascading down to children in a Tree structure ASP.NET MVC 3
And it was to make a recursive method – i.e. just a method that calls itself again.