public IHttpActionResult DeleteGrade(int id) { Grade grade = gradesService.DeleteGrade(id); if (grade == null) { return(NotFound()); } return(Ok(grade)); }
public IHttpActionResult DeleteGrade(int id) { try { GradeDTO retVal = service.DeleteGrade(id); logger.Info("Admin deleted grade"); return(Ok(retVal)); } catch (Exception e) { return(BadRequest(e.Message)); } }