public async Task <IActionResult> Delete(int id) { try { await _AppointmentServices.Delete(id); return(Ok()); } catch (System.Exception ex) { return(BadRequest(ex.Message)); } }