1

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.

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

2

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.

Comments

1

Check Castle Project ActiveRecord.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.