tags:

views:

280

answers:

3

When developing with .NET 3.5 I naturally use LINQ for data access.

But for .NET 2.0 projects, what data access model is the best one to use? I tend to use TableAdapters mainly, but sometimes also write my own SQL depending on the situation.

+6  A: 

Have you tried NHibernate? I haven't used it much myself, but my experience with its Java cousin was very positive.

There are other alternatives such as LLBLGen as well.

It would be very hard to recommend an overall "best" solution without knowing more about the problem though.

Jon Skeet
Thanks for the reply. I didn't know Hibernate had a .NET port, I've also had very good experiences with Hibernate with Java so I will defiantly give that a look.
weiran
+2  A: 

CodeSmith is another good tool from what I've heard.

There's no such thing as the best DAL, only the best for the current solution.

We used an in-house one for many years which wasn't too bad but ultimately unmaintainable vs commercial products.

Slace
+1  A: 

For an MVC style ASP .Net 2.0 application you can use Castle project and ActiveRecord for data access. ActiveRecord can be used separately.

Active Record
"The enterprise data mapping pattern implemented using NHibernate"
http://www.castleproject.org/

anixi
I was less than impressed with ActiveRecord when I was investigating it the other week. I'm too use to having a code-gen than having to hand-code my classes. Or is there a code gen for it?
Slace