views:

39

answers:

0

I have generated an Entity model from database and also use the STE template to generate the entity classes.

I have an entity that has 4 navigation properties and need to use this on a asp.net application. The web page is a master -detail type of a page that needs to show the main entity and also the related child entities.

I have included the child tables so that i can easily query the object graph and display the details.

This web form has edit/update/delete functionality. I would like to track changes to the entity as well as be able to use the same entity across postbacks using viewstate.

Is there any best practice on how to update entites with the graph across postbacks. Is viewstate the proper approach?

If i use viewstate, how do i reattach this entity back to the object context?