Thanks for the quick response!
It would be tough to switch to the adapter model at this point as all of our code(in a 150+ table project) is using the self-servicing model. It's only now though that we realized that we can't use TransactionScope(in the production environment), and have to instead rely on another method for transactioning.
To answer your questions both updates are in the same thread, however the transaction is only commited after the same entity has been updated twice from two different locations in the code.
Both updates look very similar. Something like:
CustomerEntity entity = new CustomerEntity(ID);
GlobalTransaction.Add(entity);
//change some entity values
entity.Save();
This syntax will work for the first time through because the entity hasn't been locked yet. However the second time through it will lock on the first line: If it could make it through two itereations it would call GlobalTransaction.Commit(). They both run in the same thread, but completely different sections of code that don't have access to the same instantiation of the customer entity. They both do have access to the same global transaction. This is why the second block of code I described in the first post will work...it's just very verbose.
I have no issue sharing the transaction, as this is what I'm doing now. So in other words I know the solution, but it just seems really complicated to me. It seems like I have to explicitly enlist every single entity and collection in the shared transaction. Also from my understanding what was once done in one line of code now has to be done in 4(as I can no longer use the constructor/ID syntax). I was hoping there was a way to implicitly enlist all entities and collections in a global transaction. Or perhaps I am overlooking something and it can be a lot simpler.
Of course it would be a LOT simpler if I could just use DTC and TransactionScope, but this isn't the case. It's almost like I need a LLBLGen version of the TransactionScope class, which causes all entities and collections to check for a global running transaction and automatically enlist.
Unfortunately I don't have a lot of time to go experimenting with this idea, as maybe I could change the templates to work this way. I've also read somewhere that people are overriding the default behavior of the TransactionScope somehow to not elevate transactions, but again I'd need to do a lot of testing to make sure this this was really working. I work in a government contract and it would tough to get approval for something that is not a standard and proven approach.
Any suggestions would be most appreciate!