Closing an EDM ObjectContext?

Posted by David Veeneman on Stack Overflow See other posts from Stack Overflow or by David Veeneman
Published on 2010-03-17T13:53:44Z Indexed on 2010/03/17 14:11 UTC
Read the original article Hit count: 301

Filed under:

I am getting started with the ADO.NET Entity Framework 4.0. I have created an EDM and data store for the app, and it successfully retrieves entities. The application holds the EDM's ObjectContext as a member-level variable, which it uses to call ObjectContext.SaveChanges(). So far, so good.

I am going to refactor to repositories later. Right now, my question is a bit more basic: When I am finished with the EDM, what do I need to do to release it? Is it as simple as calling Dispose() on the ObjectContext? Thanks for your help.

© Stack Overflow or respective owner

Related posts about entity-framework