Пример #1
0
 private void ValidateServiceCall(long leaseId, long leaseRowVersion)
 {
     if (!_leaseService.IsRowVersionEqual(leaseId, leaseRowVersion))
     {
         throw new DbUpdateConcurrencyException("Lease version mismatch.");
     }
 }
Пример #2
0
 /// <summary>
 /// For a deposit service call to be valid, the user must have the lease edit claim and the lease being edited must be up to date.
 /// </summary>
 /// <param name="leaseId"></param>
 /// <param name="leaseRowVersion"></param>
 private void ValidateServiceCall(long leaseId, long leaseRowVersion)
 {
     if (!_leaseService.IsRowVersionEqual(leaseId, leaseRowVersion))
     {
         throw new DbUpdateConcurrencyException("You are working with an older version of this lease, please refresh the application and retry.");
     }
 }
Пример #3
0
 /// <summary>
 /// For a term service call to be valid, the user must have the lease edit claim and the lease being edited must be up to date.
 /// </summary>
 /// <param name="leaseId"></param>
 /// <param name="leaseRowVersion"></param>
 private void ValidateTermServiceCall(long leaseId, long leaseRowVersion)
 {
     _user.ThrowIfNotAuthorized(Permissions.LeaseEdit);
     if (!_leaseService.IsRowVersionEqual(leaseId, leaseRowVersion))
     {
         throw new DbUpdateConcurrencyException("You are working with an older version of this lease, please refresh the application and retry.");
     }
 }