Is there a Tool to Generate Fluent Auto Mapped Classes from an Existing Database?
Hello,
Excuse my ignorance as I'm new to both NHibernate and Fluent. I have a SQL 2008 database and would like to generate the entity classes from the data model. It would be nice if the classes where setup properly to support Fluent's auto mapping feature. Does such a tool already exist? Thank you.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by James Gregory on 18 Feb, 2010 07:19 PM
Unfortunately there's no mechanism in Fluent NHibernate to do this, and I'm not aware of any in NHibernate itself either; the only utility I know of is one to generate classes from your mappings, but that won't be of much use in your situation.
I know it's not what you want to hear, but it's often a good exercise to do it yourself anyway; especially when you're new to a tool, it can help you understand what's happening better. If you do decide to go this route, there's the wiki and the getting started guide that should help you begin, and you can always ask for assistance here.
James Gregory closed this discussion on 19 Feb, 2010 12:06 PM.
Chris C re-opened this discussion on 19 Feb, 2010 09:28 PM
3 Posted by Chris C on 19 Feb, 2010 09:28 PM
Hello James,
Thank you for your response. I ended using MyGeneration
(http://www.mygenerationsoftware.com/portal/default.aspx) and
modifying an existing NHibernate script to get my entities written out
in C#.
Support Staff 4 Posted by James Gregory on 19 Feb, 2010 10:08 PM
Great! Glad you managed to get something working.
James Gregory closed this discussion on 19 Feb, 2010 10:08 PM.