Is there any library for .NET that allows user to manipulate database schema from code using the same code for different DB providers?
I built my own utility library that allows me to create or alter tables or columns but I wonder if there is already such a library. One that also includes constraints and indexes.
I use something like this:
DBManager db = new DBManager(connString);
DBTable persons = new DBTable("Persons");
orders.Columns.Add(new DBColumn("Name", DBType.Varchar, 100);
orders.Columns.Add(new DBColumn("Birthday", DBType.Date);
db.CreateTable(persons);
db.AddColumn("Persons", new DBColumn("CityID",DBType.Int);
db.DropColumn("Persons", "Birthday");
Of course, this isn't hardcoded. I want to add a feature to my application to allow users to specify they own entities that can be stored in database and then my app will use the library to create the underlying database table.