Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Could anybody help me to find a good tutorial about how can I implement DAO pattern and also tools that help me to create this classes in automated way.

share|improve this question
Please note that I exchanged the repository tutorial link because the codeproject article was quite difficult and not straight to the point. –  Falcon Sep 23 '11 at 16:24

1 Answer 1

up vote 6 down vote accepted

I think it might help you more to google for the repository pattern. It's nearly the same as a DAO, only that DAOs can be finer grained while a repository usually just encapsulates an aggregate root. The principle behind both is the same, though.

As for the code generation: You could just setup a T4 template for them or use an other template engine like NVelocity to create those DAOs automatically. However, if you implement DAOs/Repositories in a generic fashion, then there's little need for code generation in my opinion.

Here's also a tutorial for implementing DAOs with entity framework.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.