Linq to SQL with Repository Pattern and DDD
I'm trying to learn more about Domain Driven Development including the Repository pattern, Unit of Work, etc. and reading Fowler's book and Evans...but just started to do so. I want to setup an app to separate my Data Layer logic and structure fr开发者_开发技巧om my BL (Domain).
If I use LINQ to SQL I assume this is simply creating my table-to-class tightly coupled objects which has nothing to do with DDD because I can then create a repo pattern and separate concerns between my DL (LINQ to SQL) and my BL logic...is that correct?
Your assumption is correct.
LINQ to SQL is just going to map your relational DB to Objects - Entity Framework will do the same as will nHibernate and a plethora of others. Once you have your domain objects mapped, which you are doing, then you can create your repositories and your units of work etc. right down the DDD line.
Check this action out for some heavy duty DDD goodness:
microsoftnlayerapp
精彩评论