Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Database abstraction for Microsoft SQL Server, Oracle, MySQL and DB2

I need an example C# source code that abstracts databases (easy to change from one database to another with minimal code modification). Do you know some sample sites or tutorials with good quality?

Specific target databases are as follows:
1. Microsoft SQL Server
2. Oracle
3. MySQL
3. DB2

My specific requirements and encountered issues are the following:
1. Abstraction of classes used in data access.
2. Using parameters in calling stored procedures. In Microsoft SQL Server @ is fine. Other databases does not support @.
3. Converting query syntax from one database to another. Do we have some sort of "generic" query and then make some classes that generates queries it to a target database?
4. Strictly typed datasets in the data access layer. I remember from experience that the TableAdapter and Query wizard of Visual Studio failed for MySQL.

Thank you in advance for your expertise and time.

like image 507
yoitsfrancis Avatar asked May 27 '09 15:05

yoitsfrancis


1 Answers

Have a look at

  • LLBLGEN (commercial)
  • NHibernate (free)
  • MyGeneration (free)
  • NetTiers (kind of free)

and other ORMs

like image 84
Mitch Wheat Avatar answered Sep 30 '22 07:09

Mitch Wheat