views:

337

answers:

5

Hi everyone,

I guess I'm old school, when I architect a project I still think of writing a database layer that includes use of objects like datareaders and datasets... But it seems to me that Microsoft had to come up with better tools since my last project in 2.0, something that would hide all the pipping labor and keep the developer focused on writing logic, or at least less plumbing code.

How is that done with 3.5 ?

Thanks, Yann

+5  A: 

After DataReader/DataSets - I think - the best choice is Linq2SQL. A good start from Scott Gu: Using Linq To SQL

And naturally here are other options:

ORM

  • Entity Framework: sounds great, but not stable yet.
  • Telerik Open Access: maybe too alien after direct SQL but I like it
  • NHibernate or Fluent NHibernate: be carefull - great tools but very different approach from plain ADO.NET.
  • And just for the list: list of .NET ORM tools

Data Access Tools (sorry no idea for better title)

  • Subsonic: after direct SQL manipulation maybe this is Nr2. (or Nr1.?) after Linq To SQL. Clean, well documented, object2table perspectivic tool. Personally I like it.
  • Enterprise Library Data Access Block: maybe it's not easy at first time, but uses DataReader.

So in my opinion you should try Subsonic (quickstart here) and Linq2SQL too. Maybe 1-2 proof of concept demo will enlight the way.

boj
Voted up for the excellent link to the list of ORM's, but i would not really advocate using Linq to SQL now that its future is doubtful.
Bjørn
Not easy with Linq2SQL. Positive: easy to understand from T-SQL perspective, handy, and the net is full of knowledge. Negative: development stopped - but what we have it's great.
boj
+1  A: 

You could use an ORM tool like NHibernate or Subsonic.

geofftnz
A: 

You should look into using an ORM framework such as nHibernate. There are a number of frameworks available and they greatly reduce the need to write "plumbing" code.

Anthony
+1  A: 

One alternative is using ORM tools like NHibernate or Entity Framework or Linq2SQL. If you are into REST, ADO.Net data services might be a good fit.

Gulzar
+2  A: 

Well...Don't discount your experience with datasets and readers yet ;-)

You might like to look at Linq to Entities or things like NHibernate and other ORM's. But don't let the hype carry you away, evaluate them against your requirements, you may just find that you still come back to Datasets and readers in some cases.

Tim Jarvis