Entity Framework ObjectContext Life-cycle
Posted
by Leonardo
on Stack Overflow
See other posts from Stack Overflow
or by Leonardo
Published on 2010-05-05T16:25:58Z
Indexed on
2010/05/05
16:28 UTC
Read the original article
Hit count: 250
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
© Stack Overflow or respective owner