Is there a reason for using the Repository pattern with Entity Framework if I know I will only ever use EF?

后端 未结 5 1269
离开以前
离开以前 2020-12-30 01:56

From reading various books and articles, I seem to rather often find the usage of the Repository-pattern suggested. I get the point if you need to be able to swap out your d

5条回答
  •  庸人自扰
    2020-12-30 02:17

    They are many opinions on the issue but after using repositories for 2 projects, i never tried it again.

    Too much pain with hundreds of methods for all those cases with no clear benefits (i'm almost never going to swap out EF for another ORM).

    The best advice would be to try it out so you can make an informed opinion on which route to take.

    Some opinions against it here

提交回复
热议问题