Esempio n. 1
0
 public IActionResult Delete([FromRoute] int id)
 {
     try
     {
         _service.DeleteDoctor(id);
         return(NoContent());
     } catch (DoctorNotFoundException)
     {
         return(NotFound());
     }
 }
Esempio n. 2
0
 public IActionResult DeleteDoctor(int id)
 {
     try
     {
         _service.DeleteDoctor(id);
         return(Ok());
     }
     catch (Exception e)
     {
         return(BadRequest());
     }
 }
Esempio n. 3
0
 public IActionResult DeleteDoctors(int id)
 {
     return(Ok(context.DeleteDoctor(id)));
 }