开发者

Repository Pattern Books

开发者 https://www.devze.com 2023-03-31 11:20 出处:网络
I would like to know a good introducing book for Repository Pattern using Entity F开发者_如何学运维ramework.

I would like to know a good introducing book for Repository Pattern using Entity F开发者_如何学运维ramework. Do you know any? thanks


Read the book about Entity Framework, relevant parts from the book about enterprise application patterns and the book about domain driven design. You must first understand every single part to use it correctly.

Once you understand topics answer few questions:

  • Why do you need repository?
  • What will repository solve for you?
  • Why is EF itself not sufficient for that?
  • Will it help if you wrap EF to repository?
  • etc.

Until you don't know at least expected answers for these questions you don't need to bother with repository pattern. The main rule of pattern usage: A pattern should be used when it is needed not because it exists. The boom of all these repository articles goes against this rule and moreover most of these articles are wrong using either wrong code (like passing Func<> to queries instead of Expression<Func<>>) or bad assumptions (like saying that using repository will make your code unit testable).

0

精彩评论

暂无评论...
验证码 换一张
取 消