Код: Выделить всё
public async Task DoBusiness()
{
dbContext1.Table1.Add(entity1);
await dbContext1.SaveChangesAsync();
dbContext2.Table2.Add(entity2);
await dbContext2.SaveChangesAsync(); // throws an error, what about the first change
}
Подробнее здесь: https://stackoverflow.com/questions/790 ... b-contexts