Repository vs Service pattern in DAL: EF and Dapper

后端 未结 4 719
情深已故
情深已故 2021-02-01 09:18

I\'m working on project and I need to design the DAL. I will be using Entity Framework for most of the project and Dapper for some performance-sensitiv

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-01 09:59

    I recommend you to watch this tutorial: Entity Framework in the Enterprise Here, the author explains very well the Entity Framework and the Repository Pattern, and at the end, She implements 2 Repositories: one for conventional App and another for disconnected App. One good point she made was that not one thing fit all. Basically you can adapt your Repository to your specific need.

    For your case, I will implement 2 repositories: one in top of EF and another for Dapper.

提交回复
热议问题