Author: trnelson | Posted on: 6/22/2008 2:18:22 AM | Views : 445

Hello!
I got this DatabaseHelper class from DotNetBips.com and have been playing with it for the past few days.  It's been very helpful for the project I am working on, however there is one tricky thing I can't seem to wrap my head around.  I have pasted the original code below for reference.  I am trying to figure out a way to better support Output Parameters in this class.

Basically, I am trying to keep any data provider-specific code out of my business layer.  This code has functionality to set the provider in web.config, and then ADO.NET usage is encapsulated based on that.

There is an AddParameter(DbParameter) method that accepts a parameter object, but the problem I'm running into is that it seems this parameter has to be a provider-specific one (Sql Server, Oracle, etc.)  I'd like to implement a way for this to be encapsulated within the DatabaseHelper class.  My thought was to add a CurrentProvider f ...

Go to the complete details ...