Nested TransactionScopes in .NET
.NET December 7th, 2009In next example, the persistence to the database will not be executed.
C#:
-
{
-
{
-
//Persist to database
-
rep.CreateRoot(dto, 1, false);
-
scope2.Complete();
-
}
-
scope1.Dispose();
-
}
-
dto = rep.GetByKey(dto.id, -1, false);
scope1.Dispose(); is not necessary in this example, but I added it for clearance.
Recent Comments