views:

182

answers:

4

Hello, I am looking for a data access layer for ado.net. I am not interested in linq, EF, NHibernate or any other ORM. Currently, I am using the data access layer from umbraco. The DAL is very good but they stopped developing it so i am looking for a different one. Does anyone know where I can find a list of DALs that I can test?

+8  A: 

If you want a DAL, but not an ORM, why not just use ADO.NET directly?

There is no real reason to add an extra layer on top of ADO.NET, unless you want to have the flexibility and ease of development garnered by using an ORM...

Reed Copsey
... or, if you want abstraction for a future change between databases that implement ADO.NET's interfaces. +1 for stating exactly what I thought after reading the question.
Jim Schubert
The reason I didn't want to use ado.net directly is because I must close all the resources manually. With the umbraco DAL the connection and datareader is closed automatically
Luke101
Just call CommandBehavior.CloseConnection in your DAL when you execute your reader
Terry
+2  A: 

I know you said you didn't want to use LINQ to SQL because it is an ORM, but you don't have to use it like an ORM. You can also execute raw SQL via ExecuteQuery and have it automatically fill the results into properties of objects for you. You can specify the desired type of the result object as a type parameter. It's not full-blown ORM - it gives you control over what SQL you send, but it saves having to iterate over data readers.

Mark Byers
Wow..good idea..How is the performance of executequery command
Luke101
In my experience, it is fast. I usually only use it as a fallback when the automatically generated LINQ to SQL queries are too slow. I don't have any benchmark figures handy though.
Mark Byers
This is still using an ORM, though. Most ORMs have the option of configuring them to use a Stored Procedure or a hand-written query instead of the autogenerated one, although you often lose a lot of flexibility in this case, since you can't use `IQueryable<T>`...
Reed Copsey
A: 

Hello, I have found a much better way to do this. I am going to use microsofts Data Access Application Blocks. This way I don't need to close the connection or the reader every single time.

Luke101
Why are you worried about "closing the connection" regularly? SQL Server uses connection pooling, so you don't really have overhead associated with closing and opening connections...
Reed Copsey