Entity Framework ObjectContext Life-cycle
- by Leonardo
Hello,
I'm developing a web application using asp.net 4.0 with Entity Framework.
In my apllication I have a page DataEntry.aspx wich has 3 web user control.Each user control manage an entity and use a repository class to access data. The final user before save all the changes can add or remove entity in memory.
My question is: how can i share the ObjectContext between the repositories?
Basically I need a ObjectContext for the entire session working of DataEntry.aspx.
How can I achive this?
Thank you