Is it possible to place SqlCommands and actions on Entities (fetch, save, delete) into the the same SqlTransaction?
We already have some DAO classes wich we would like to reuse, and there are some unnormalized tables wich are not so easy to use as entities. And last but not least its always good if one can fall back just in case.
I noticed the PhysicalTransaction property, would the following code be sufficent?
SqlConnection con = createConnection(); con.Open();
SqlTransaction trans = con.BeginTransaction();
Transaction llbglTrans = new Transaction(IsolationLevel.ReadCommitted, "dostuff");
llbglTrans.ConnectionToUse = con; llbglTrans.PhysicalTransaction = trans;
// do stuff
llbglTrans.Commit();
con.Close();