public virtual OperationResult Update(Dish dish) { try { using var transactionScope = new TransactionScope(TransactionScopeOption.Required, transactionOptions, TransactionScopeAsyncFlowOption.Enabled); _dao.Update(dish); transactionScope.Complete(); return(new OperationResult <List <Dish> > { Success = true }); } catch (Exception e) { return(new OperationResult <List <Dish> >() { Success = false, Exception = e }); } }
public OperationResult Update(Dish dish) { try { _dao.Update(dish); return(new OperationResult() { Success = true }); } catch (Exception e) { return(new OperationResult() { Success = false, Exception = e }); } }