С помощью System.Transaction
вы можете вкладывать TransactionScope
, например:
using (var tran1 = new TransactionScope())
{
// modify context
using (var tran2 = new TransactionScope())
{
// modify context
tran2.Complete();
}
tran1.Complete();
}
Как я могу смоделировать это поведение в Entity Framework Core 2.1 с помощью DbContext.Database.BeginTransaction()
?