Example #1
0
        public bool Update(T changedRecord)
        {
            ValidateBeforeUpdate(changedRecord);
            var ok = _repo.Update(changedRecord);

            if (!ok)
            {
                return(false);
            }
            ExecuteAfterSave(changedRecord, false);
            return(ok);
        }
Example #2
0
 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.");
     }
 }
Example #3
0
 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");
             }
         }
     }
 }