public IActionResult Put([FromBody] List <AppointmentSlots> appointmentSlots) //public IActionResult Put([FromBody] AppointmentSlots appointmentSlots) { FairfieldAllergeryRepository fairfieldAllergeryRepository = new FairfieldAllergeryRepository(); for (int i = 0; i < appointmentSlots.Count; i++) { if (appointmentSlots[i].NewSlotNumber > -1) { OperationResult operationResult = new OperationResult(); operationResult = fairfieldAllergeryRepository.UpdateNumberOfSlots(appointmentSlots[i].SlotId, appointmentSlots[i].NewSlotNumber); } else if (appointmentSlots[i].NumberSlots < 1) { OperationResult operationResult = new OperationResult(); operationResult = fairfieldAllergeryRepository.UpdateNumberOfSlots(appointmentSlots[i].SlotId, 0); } } return(Ok(new { status = "Success" })); }