Hi,
I've used SharpArch since its first inception on CodeProject and followed a
lot of the design philosophy in the Enterprise Sample. Since then, I've
modified and maintained the source constantly improving to fit my needs.
I haven't exactly swapped out the first architecture for the latest one
hosted on here primarily because there are some design issues that I didn't
agree with. One such design issue is this Transaction issue.
In my modified version of SharpArch, I've removed CommitChanges() on the
IDao interface and opted for something like:
using(var x = new TransactionScope())
using(var u = new UnitOfWork()){
//do some stuff,
//possibly with multiple daos calling save
//even on different databases
u.Complete();
}
I prefer having fined grain control over the unit of work and transactions.
I think any addition into SharpArch should not sacrifice explicit control,
IMHO. I've also ripped out the NHSessionManager class and replaced the
implementation to use NHibernate.Context and it's working quite well. I
think, this type of pattern, in my work, lends itself well in distributed
transactions and works well with System.Transactions and MSDTC. ymmv.
-Brian
----------------------------------------------
Brian Chavez
Bit Armory, Inc.
http://www.bitarmory.com