tags:

views:

140

answers:

2
+1  Q: 

From C# to hbm.xml

I'm looking for a NHibernate Mapping generator which could generate a mapping file (hbm) and SQL Script from a C# class. I've found generators for the other way around, but not for this case.

Can you guys point me to nice generator?

Thanks a lot!

+2  A: 

With Fluent NHiberate you can do without mapping files. In the instances where the automapping doesn't work, you can override.

This post discusses schema generation http://stackoverflow.com/questions/644496/fluent-nhibernate-schema-generation

Jason Watts
I really apreciate your input, but i'm asking for a HBM files generator.
mcabral
@mcabral: the question linked by Jason has the necessary information to generate hbms: http://wiki.fluentnhibernate.org/Fluent_configuration#Exporting_mappings
Mauricio Scheffer
@Mauricio shame on me
mcabral
+1  A: 

The newest, fastest and most extensible way to configure NHibernate is ConfORM.

You don't need to generate xml files (although you can do so if you want). It's an order of magnitude faster than Fluent NHibernate and, overall, less work.

For some examples, read Fabio Maulo's posts.

Diego Mijelshon