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# cl开发者_运维百科ass. 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!
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 Fluent Nhibernate Schema Generation
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.
精彩评论