views:

872

answers:

1

Hi All,

I found a fantastic template for NHibernate code generation using MyGeneration here,

http://vucetica.blogspot.com/2009/01/nhibernate-template-for-mygeneration.html

This creates XML mapping files with the extension hbm.xml.

I was wonder if anybody knows of templates which support fluent NHibernate which defines the mapping using C# files.

Thanks

+1  A: 

When you are using Fluent NHiberate you needn't hbm files, you can generate them based on your domain model and conventions

Sly
Aren't you assuming that the domain model / classes already exist? What if the OP has a database but no classes defined and wants to auto-generate the classes?
Michael Maddox
Using auto mapping is an option, but it might not be flexible enough. Hard to say at this stage. I will keep it in mind though - it is good to know about. Thanks.
peter