public IActionResult Delete(int id) { AppointmentLogic aptLogic = new AppointmentLogic(_unitOfWork); try { if (aptLogic.Delete(id) > 0) { return(Ok()); } else { return(NotFound()); } } catch (Exception ex) { return(BadRequest(ex)); } }