public void UpdateStaffSupport(StaffSupportRequest model) { DeleteByCustomer(model.CustomerId); foreach (var item in model.StaffIds) { IU(new StaffSupport() { CustomerId = model.CustomerId, StaffId = item }); } }
public async Task <IHttpActionResult> UpdateStaffSupport(StaffSupportRequest model) { try { _uow.StaffSupport.UpdateStaffSupport(model); return(Ok()); } catch (BusinessException ex) { return(BadRequest(ex.Message)); } catch (Exception ex) { _log.Error(ex); return(BadRequest(this.General_Err)); } }