Is there any C# .NET ORM that can create databases ?
It should be capable of creating MS + MySQL + PostGre + Oracle databases at least.
And I don't mean tables or schemas, I mean the database only.
I use nHibernate, but it can only create tables and schemas, and query/insert but not creating the database itself.
views:
155answers:
4That's usually a little bit outside the scope of an ORM. There's a significant amount of complexity associated with creating a database that often has little to do with your application-specific mappings (permissions, access control, etc.). Sometimes ORM tools will generate the DDL/statements you need to create the database from scratch, but that's not quite the same thing as actually making the database itself.
http://www.signumframework.com/
One of very few ORM based on Model-first approach.
Also note that future releases of Entity framework are supposed to support model-first approach.
I've used nHibernate's (NHibernate.Tool.hbm2ddl) SchemaExport feature to generate DDL from my classes and mapping.
Check these out:
Create DB from Classes and Mappings with NHibernate-Domain Driven Design
NH Toolset Guide
A related SO Post:
NHibernate SchemaExport and Configure() catch-22
Update:
After reading your comment, I'm not quite sure this is what you need. Anyway, just for info.
DataObjects.Net - it is designed for model-first approach; it supports MS SQL, Oracle and PostgreSQL. MySQL support is planned.
See Database Schema Upgrade chapter of the Manual - it explains the details related to runtime schema creation and upgrade.
In contrast to Signum framework (that actually very close by the approach it supports), DataObjects.Net has almost no limitations related to mapping. E.g. you can use composite primary\foreign keys. Its another advantage is perfect LINQ support.
P.S. I'm one of its authors.