public bool Update(T changedRecord) { ValidateBeforeUpdate(changedRecord); var ok = _repo.Update(changedRecord); if (!ok) { return(false); } ExecuteAfterSave(changedRecord, false); return(ok); }
private static void EditLease <T>(T lse, ISimpleRepo <T> repo) where T : LeaseDTO { lse.Rent.PenaltyRule = RentPenalty.ZeroBackrent; if (!repo.Update(lse)) { throw Bad.Data("Update(lse) did NOT return true."); } }
private static void ProcessRequests(ISimpleRepo <FundRequestDTO> repo) { foreach (var req in repo.GetAll()) { if (IsBuggy(req, out AccountAllocation bdo1Alloc)) { FixBuggyAlloc(bdo1Alloc); if (!repo.Update(req)) { throw new Exception("Request Update failed"); } } } }