11

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 example or learning resource that can be shared?

3 Answers 3

10

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.

Sign up to request clarification or add additional context in comments.

Comments

1

Domain Driven Design by Eric Evans is a great place to learn all about the Repository pattern and more. http://dddcommunity.org/books/

Comments

1

Here is an article describing an implementation of the repository pattern using Linq to SQL. The full code is open source, available @ github.

http://www.macskeptic.com/living/by/the/code/c/2009/07/02/the-repository-pattern/

5 Comments

Very nice. I've downloaded the code and browsed through it. Very impressive and robust solution. Thank you.
Link appears to be broken. "Bad Request (Invalid Hostname)"
The links are dead :(

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.