Se avete somehting in questo modo:transazioni nidificate con TransactionScope
IBinaryAssetStructureRepository rep = new BinaryAssetStructureRepository();
var userDto = new UserDto { id = 3345 };
var dto = new BinaryAssetBranchNodeDto("name", userDto, userDto);
using (var scope1 = new TransactionScope())
{
using(var scope2 = new TransactionScope())
{
//Persist to database
rep.CreateRoot(dto, 1, false);
scope2.Complete();
}
scope1.Dispose();
}
dto = rep.GetByKey(dto.id, -1, false);
disposta la TransactionScope Scope2 interno anche essere rotolato indietro?
Questo link è rotto. – adamjford
Si dice scope.Dispose è ridondante, ma soprattutto scope1.dispose restituisce la transazione. – Mcanic