With CSLA.net, all domain classes need to inherit from Businessbase, which contains non-virtual properties.
When using NHibernate, we need to implement virtual properties for lazy loading.
Some options to use CSLA/NHibernate together seem to be:
- switch lazy loading off in NHibernate and implement lazy loading code in the domain classes (although this seems less flexible)
- leave lazy loading on in NHibernate but use a DTO class to map to the database and then transfer the data to the CSLA domain classes
What other options might there be? Any pointers in the right direction will be much appreciated.
I suppose the above question is really applicable to using NHibernate with any framework.