ASP.NET MVC2 Data Access Layer

Posted by Paul on Stack Overflow See other posts from Stack Overflow or by Paul
Published on 2010-04-30T22:39:11Z Indexed on 2010/04/30 22:47 UTC
Read the original article Hit count: 549

For a small/medium sized project I'm trying to figure out what is the 'ideal' way to have a domain layer and data access layer. My opinions on coupling tend to be more towards the view that the domain models should not be tightly coupled with the database layer, in other words the data access layer shouldn't actually know anything about the domain objects.

I've been looking at Linq-to-sql and it wants to use its own models that it creates, and so it ends up VERY tightly coupled. Whilst I love the way you use linq-to-sql in code I really don't like the way it wants to make its own domain objects.

What are some alternatives that I should consider? I tried use NHibernate but I did not like the way I had to use to query and get different objects. I honestly love the syntax and way you use linq, I just don't want it to be so tightly coupled to domain objects.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about c#