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