Generate C# entities from existing DB and Fluent NHibernate auto mapping

Lance Fisher picture Lance Fisher · Dec 11, 2009 · Viewed 12.9k times · Source

I'm working with an existing database that uses some really ugly conventions. I'd like to use NHibernate, and I think I can fix all these ugly DB conventions using Fluent NHibernate's auto mapping conventions. I'd like to avoid writing all the entity classes by hand. (This is where LINQ to SQL and SubSonic are appealing)

Is it possible to generate my C# entities based on my database schema and mappings specified in Fluent NHibernate?

Aside: Do you know of a designer for NHibernate?

Answer

meridian picture meridian · Jul 31, 2010

I think, this is what you want: NHibernate Mapping Generator. http://nmg.codeplex.com/