Injecting NHibernate Repository into CSLA ObjectFactory is much easier than doing this in CSLA BO.
AutoMapper is very hard to use to pass data from NHibernate model to CSLA BO due to many flag setting in DataPortal methods.
Aggregate root pattern is missing from CSLA, processing child list is completely different in ORM world. CSLA is still following the table-BO one-to-one style.
CSLA sample app has demo code of using ORM like EF or Linq2Sql, but MODEL in those ORM is just used as data structure. It’s fair to keep CSLA BO business rich, but why use ORM for? Just to connect to database?
The way CSLA using WCF is weird, a real world SOA app should not have a contract with just CRUD operation defined in it.
Exception handling is different, while it definitely makes sense for UI/F5 developers, it drove my nuts when looking for exception when things don’t work, exception suppose to bubble up all the way, not hidden in control somewhere.
N-level undo is interesting. Again, who is using it?
Most wonderful features in CSLA:
- Very rich and thoughtful UI controls, like cslaActionExtender, error provider and the usage of datasource on WinForms/WPF. Drag and drop, property setting, etc… I really miss it, especially when doing UI tasks.
- Broad UI/OS support, even covers iOS with monoTouch on hand. Using it as a rich screen DTO in app isn’t a bad idea. For data access, stick with NHibernate.
My demo app of how to use CSLA with NHbernate. Value Object pattern is used to process child line item list, flag comparison when updating list is possible, but not worth if lint_item_id doesn’t matter.