I'm very new at this, but I need to create new tables from existing classes without creating them by hand. Can this be done using a tool or command line?
+4
A:
Yes, with nhibernate you can generate and update schemas automatically.
var cfg = new Configuration();
cfg.Configure();
cfg.AddAssembly(typeof (aClassFromYourProject).Assembly);
new SchemaExport(cfg).Execute(false, true, false, false);
Daniel Auger
2009-05-02 23:16:50
Thank you very much! I recently chose Linq-to-Sql for a company project and wish I'd gone with Nhibernate instead, given its completeness, community support and capabilities. I appreciate the help! It worked perfectly.
mkelley33
2009-05-02 23:35:06
Thank you for the answer. I've recently had the same question and I've immediately found a short and usable answer.
Lyubomyr Shaydariv
2010-05-09 08:27:39