I have a lot of classes and this is a lot of work to do the XML mappings.
+4
A:
Yes, nHibernate can be used without XBM files.
There is a fluent interface for configuration and mapping, which should give you a more type safe way to map your classes.
You can use the auto mapping feature and fall back to fluent mapping as needed.
Oded
2010-10-17 10:20:28
@Oded, you've answered two of my answers tonight. Thanks for that
Am
2010-10-17 10:49:57
"However, you still need to do the mapping." FNH has thing called auto-mapping. It is possible to avoid manual mapping. Doing that right now with huge success. http://wiki.fluentnhibernate.org/Auto_mapping
Arnis L.
2010-10-17 11:49:11
@Arnis - Thanks for the tid-bit. Wasn't aware of this feature. Answer updated.
Oded
2010-10-17 14:04:57
You can also use nhibernate attributes. Of course, what this does is serialize the XML files in the background in a memorystream... But it's much more convenient than writing the XML by hand.
Quandary
2010-10-17 14:48:53
+1
A:
It's possible to use Castle ActiveRecord too. It does not require mapping hbm files.
afsharm
2010-10-17 11:47:06