private static CancelAppointmentDTO AppointmentId() { CancelAppointmentDTO cancelDTO = new CancelAppointmentDTO { AppointmentId = 5 }; return(cancelDTO); }
public IHttpActionResult CancelAppointment([FromBody] CancelAppointmentDTO cancelAppointment) { AppointmentLogic appointmentLogic = new AppointmentLogic(); var AffectedRow = appointmentLogic.CancelAppointment(cancelAppointment.ID, cancelAppointment.CurrentUserID); if (AffectedRow == 0) { NotFound(); } return(Ok(AffectedRow)); }
public IActionResult CancelAppointment(CancelAppointmentDTO cancelAppointmentDTO) { bool canceledAppointment = _appointmentService.UpdateCanceled(cancelAppointmentDTO.AppointmentId); return(Ok(canceledAppointment)); }