7

In our company, we work together with several database systems (MySQL, MSSQL, PL/SQL, SQlite and SQLCe) for various projects. Because of this, we developed a library that puts everything into a nice interface where we can connect to each database without worrying about which database is now behind. But this library always required to install every database on a clients computer because .Net insisted that (because of the references). So we used MEF to create database plugins where the application only loads the appropriate plugin at startup and we don't need any other database systems installed on the host system.

Anyway, we still struggle because of the differences of each database. Let's say we want to have procedures that automatically generate required tables and data in the destination database if they aren't available. Or if the different databases uses different datatypes. Things are getting very complicated and as for now, we're interested in also using LINQ2SQL which doesn't seem to be able to handle MySQL, SQlite and PL/SQL.

My question:

Is there any free/oss C# library that takes over this tasks? Where we can have full control over our databases without thinking about which database is now behind?

Neurodefekt
  • 899
  • 2
  • 10
  • 18

3 Answers3

4

Any mature ORM library will do the work

Check this site to see comparisons of features and performance of popular ORM libraries

jezzarax
  • 417
  • 2
  • 10
  • I spent the last few days studying Entity Framework and I'm still not sure if this fits our needs. I hope you can clarify a few points: 1) It seems that EF heavily depends on the Visual Studio Environment, also app.config, but we have our own configuration solution. How can I specify a connection string w/o using app.config? 2) When EF creates a new database, it seems to create a SQLCeDB. Is this configurable? 3) Is it possible to have multiple connections to different databases at the same time? – Neurodefekt Mar 21 '13 at 14:35
  • 1) You can use EF completely without Visual Studio, check EF code first for example, however VS designers are useful and handy when you create model from existing database, but still not required. 2) EF can work with any modern database 3) Check http://stackoverflow.com/questions/2659942/entity-framework-4-and-multiple-database – jezzarax Mar 22 '13 at 12:25
0

Entity Framework does all you need. This framework has providers for a number of database engines, also it has migrations mechanism, which can adjust database for your application, depending on your model.

Dennis
  • 37,026
  • 10
  • 82
  • 150
0

NHibernate would be my choice. It is easier to use if you access it through the Castle ActiveRecord layer.

Sebastian
  • 5,177
  • 4
  • 30
  • 47