Implementation example for Repository pattern with Linq to Sql and C#

前端 未结 3 506
天涯浪人
天涯浪人 2020-12-15 10:06

I am looking for a Repository pattern implementation example/resource that follows domain driven design principles for my ASP.net MVC application. Does anyone have a good ex

3条回答
  •  自闭症患者
    2020-12-15 10:20

    It's not an uncontroversial implementation, but Rob Conery's web storefront project has implemented repository via Linq to Sql in C#.

    http://blog.wekeroad.com/

    Source is available.

    He's not quite doing strict DDD, but his TDD is generally sending him out in that direction. The one caveat is that he has multiple repositories with no aggregate roots, so it's far from a textbook example. Also, earlier implementations of the repository returned IQueryable, so there were no domain boundaries on the repository, which is the source of most of the noise made about his design.

提交回复
热议问题