EF - and repository pattern - multiple contexts

前端 未结 3 1165
野趣味
野趣味 2020-12-17 07:06

I\'ve faced some troubles with context in EF in ASP.MVC2.

I thought that best way to improve some operation on DataBase i\'ve created Repository. My repo class adds,

3条回答
  •  我在风中等你
    2020-12-17 07:41

    Here is a nice post regarding the repository pattern on top of EF:

    http://blogs.microsoft.co.il/blogs/gilf/archive/2010/01/20/using-repository-pattern-with-entity-framework.aspx

    You might also check out posts regarding the Unit of Work pattern implementation:

    http://blogs.microsoft.co.il/blogs/gilf/archive/2010/02/05/using-unit-of-work-pattern-with-entity-framework.aspx

    http://devtalk.dk/2009/06/09/Entity+Framework+40+Beta+1+POCO+ObjectSet+Repository+And+UnitOfWork.aspx

提交回复
热议问题