views:

271

answers:

6

I am really not lookinf foe an ORM just a really good DAL that I can use. Thanks

A: 

Checkout Enterpise Library. Its pretty heavyweight in terms what it can do, but for data access it's alright. http://www.codeplex.com/entlib

Jaimal Chohan
+2  A: 

In my experience, any data access layer the isn't also an object/relational mapper tends to be so domain specific as to be unusable outside of its own domain. O/RMs are powerful tools but they can be scaled back to be simply a DAL if you need them to be.

Andrew Hare
+3  A: 

You don't mention a database server, so I assume SQL Server. If you're on .NET 3.5, it sounds like LINQ To SQL is right up your alley.

ScottGu has a great article written about it here, targetted at web development.

The second set of videos listed here from ASP.NET's Learn site is also a great way to see what kind of power it gives you.

JoshJordan
I will be using either of these:FirebirdPostGres,Mysql
+1  A: 

You might find the Microsoft Data Access Application Block useful.

Database db = DatabaseFactory.CreateDatabase();
string sqlCommand = "GetProductsByCategory";
DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand); 
db.AddInParameter(dbCommand, "CategoryID", DbType.Int32, Category);
DataSet productDataSet = db.ExecuteDataSet(dbCommand);
Michael Petrotta
I think this is what Ive been looking for. Let me research this
A: 

Have you looked at SubSonic 3 yet? I'm using it for a couple of probjects, and it is farily good. Still has some issues, but if your schema is reasonably straightforward then you probably won't run into many.

I know it is an "orm", so if all you need to do is call out to stored procs manually, then just use the original enterprise library (SqlHelper) class. The new one is a royal PITA.

  • It doesn't do much except translate your objects to sql and back
  • Config is a little confusing at first, but in reality is easy
    • Add the dll (.core) to your project
    • Use the ActiveRecord .tt files
    • Edit the settings.ttinclude to change which server to connect to for the schema

From there on, if you have any questions they should be pretty easy to answer. I have it connecting to 4 different servers, with just a little app.config hacking.

Andrew Backer
+2  A: 

"Subsonic" would be a good candidate: http://subsonicproject.com/

Dimuthu
specifically subsonic 3's repository pattern and migrations really rocks. I <3 SubSonic :)
TheVillageIdiot