using (var transaction = _myContext.BeginTransaction()) {
try {
cheese.type = type;
cheese.percentage = 100;
await UpdateCheese(foo);
tacos[0] = await AssociateCheeseToTacos(foo);
transaction.Commit();
}
catch (Exception ex) {
transaction.Rollback();
throw ex;
}
}
No comments:
Post a Comment