public async Task <IActionResult> Delete(int id) { try { await facultyService.DeleteFaculty(id); return(Ok("Faculty successfully deleted!")); } catch (Exception) { return(NotFound()); } }
public ActionResult <Faculty> DeleteFacultyDTO(int id) { try { _facultyService.DeleteFaculty(id); } catch (DbUpdateConcurrencyException ex) { string msg = ex.Message; } return(NoContent()); }
public async Task <IActionResult> Delete(Faculty faculty) { await _facultyService.DeleteFaculty(faculty.Id.Value); return(NoContent()); }
public ActionResult <Faculty> DeleteFaculty(int FacultyID) { var del_fac = _service.DeleteFaculty(FacultyID); return(del_fac); }