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