Reputation: 3120
I am planning to use NHibernate for my next project with mapping through FluentNHibernate. I have a database already, so I have to generate C# classes for entities mapped to database tables.
What tool would you recommend (if there is any?) for automatic C# class generation for NH from MS SQL database?
Thanks for sharing.
Upvotes: 1
Views: 3416
Reputation: 3124
Don't.
The whole point of object-relational mapping is to... well... map.
If you generate the classes from the database you may as well be using typed datasets.
Think about what you would want your classes to look like in the object world and then use NHibernate to map that to your database schema.
Upvotes: 2
Reputation: 29143
NConstruct Lite will generate the classes and the hbm mapping files for free even though it does not support fluent NHibernate, nor does it make use of some of the new C# 3.0 features.
Upvotes: 2