public IActionResult DeleteTeacher(int Id) { if (Id < 0) { return(BadRequest()); } _teacherRepo.DeleteTeacher(Id); return(Ok()); }
public HttpResponseMessage Delete(int id) { try { _teacher.DeleteTeacher(id); var response = new HttpResponseMessage() { StatusCode = HttpStatusCode.OK }; return(response); } catch (Exception) { var response = new HttpResponseMessage() { StatusCode = HttpStatusCode.InternalServerError }; return(response); } }
public void Delete(int id) { objteacher.DeleteTeacher(id); }