CSLA 3.6 + Native NHibernate Support

CSLA 3.6 + Native NHibernate Support

Old forum URL: forums.lhotka.net/forums/t/6428.aspx


AndrewBurns posted on Sunday, February 15, 2009

Hello all,

At work we have a project that uses NHibernate + DALs to load our BOs (not CSLA).  It works but has several pain points.  I have for some time now wanted an easy way to combine NH+CSLA for my small and medium projects and have the best of both worlds.

I had some time to 'play' this weekend and it occurred to me that with the new managed properties in CSLA it would be trivial to write a NHibernate property accessor that would interact with the property manager to persist the objects.

Well...  I have a proof of concept up and running.  Currently I can retrive my sample business objects with a standard linq query and NH will spin them up and the properties get loaded as one would expect.

Like I said it is a proof of concept and still needs some work, but some of the major plus sides that exist from my point of view are:
  1. No 'funky' properties for NH - My PKs are just a get{} and not even a private setter.
  2. Mostly standard NH mapping file, just one additional attribute
  3. Out of the box Linq support
I was wondering if anyone else would be interested in this?  If so I will look at getting it hosted somewhere.  Just testing the water.

Andrew

rfcdejong replied on Monday, February 16, 2009

Andrew,

Maybe the following link provide some information or at least is a bit the same as ur proof of concept.
http://code.google.com/p/cslaptrackerfactory/

AndrewBurns replied on Monday, February 16, 2009

Thanks for the URL rfcdejong, I will definitely take a look at it.

RockfordLhotka replied on Monday, February 16, 2009

Also make sure you look at the ObjectFactory concept in 3.6, as it may be helpful in this case.

Patrick replied on Saturday, February 21, 2009

AndrewBurns:
I was wondering if anyone else would be interested in this?  If so I will look at getting it hosted somewhere.  Just testing the water.

Hi Andrew,

yes I would be interested. Thanks for offering.
I would recommend you to host your project with the other CSLA related projects...
http://www.codeplex.com/CSLAcontrib
The more everything is in a central location the easier it makes it for everybody.

Thanks again,
Patrick

Copyright (c) Marimer LLC