views:

56

answers:

2

Can anyone point me towards a current library that provides basic wrapping of ADO.NET functionality? I'm looking for something along the lines of the old SqlHelper class and am not really interested in using the Data Access Application Block (as it's a bit of overkill for my simple needs). What is everyone using for working with ADO.NET directly these days?

Update:

I should note that I'm already working with an ORM (Nhibernate); I've just run up against a situation that requires raw ADO.NET calls - so no need to suggest using an ORM instead of working with ADO.NET

+1  A: 

Dan, this is a class that I have built up over a few years. I use ADO.NET extensivly. It supports simple things like Fill, NonQuery, Scalar, but also getting a schema, transactions, bulk inserts, and more.

DataAdapter (VisualStudio 2010 solution)

Let me know if you need any more help using this (note: I removed some links to other objects to post this for you, so if it's broken, just let me know).

Brad
@Brad: thanks for sharing...but even this is a little heavier than I'm looking for..and it seems to contain a lot of 'legacy' features (eg. use of array lists), etc.
DanP
Yeah, I see that on the GetReader method. A few months ago I updated the Fill, NonQuery, and Scalar methods to take params IDbParameter[] parameters instead of the ArrayList, but I didn't update everything.
Brad
@Dan, What do you think makes it so 'heavy'?
Brad
@Brad - My needs are really simple; infact I'm starting to think I might be able to get away with just adding some extension methods to IDataReader to make my life easier. I'm always hesitant about adding large chunks of functionality to my codebase that aren't mantained elsewhere (eg. active open source or commercial package). Not a knock at all against what you've provided - just not what I'm looking for exactly.
DanP
A: 

I ended up going with Fluent Ado.net for this; great little library for doing the simple out-of-band ado.net stuff that pops up every now and then.

DanP

related questions