Implementing the repository and service pattern with RavenDB

前端 未结 4 1451
迷失自我
迷失自我 2021-02-08 02:45

I have some difficulties implementing the repository and service pattern in my RavenDB project. The major concern is how my repository interface should look like because in Rave

4条回答
  •  Happy的楠姐
    2021-02-08 03:22

    I would actually discourage you from using the repository pattern. In most cases, it is over-architecting and actually makes the code more complicated.

    Ayende has made a number of posts to that end recently:

    • http://ayende.com/Blog/archive/2011/03/16/architecting-in-the-pit-of-doom-the-evils-of-the.aspx
    • http://ayende.com/Blog/archive/2011/03/18/the-wages-of-sin-over-architecture-in-the-real-world.aspx
    • http://ayende.com/Blog/archive/2011/03/22/the-wages-of-sin-proper-and-improper-usage-of-abstracting.aspx

    I recommend just writing against Raven's native API.

    If you feel that my response is too general, list some of the benefits you hope to gain from using another layer of abstraction and we can continue the discussion.

提交回复
热议问题