Entity Framework 4.0 Best Practise for Creating Object Context
I would like to know what is the best practice for creating object context instance. Prior to Entity Framework, we are advised to delay the crea开发者_开发知识库tion of connection object until the point when we need it to execute query and dispose it as soon as we are done with it in order to conserve resources.
Will this practice applicable to the ObjectContext as well ? Would the ObjectContext keep the underlying database connection intact once we instantiate the ObjectContext or once we issue the SaveChanges call?
Thanks
Regards
Yong
The best practice for creating ObjectContext Per Http Request for more detail have a look at the below article he has discuss many scenarios.
https://github.com/geersch/EntityFrameworkObjectContext
Thanks
精彩评论