public ActionResult <ExamProgram> Delete() { List <ExamProgram> examPrograms = dataService.FindAll <ExamProgram>().ToList(); foreach (ExamProgram examProgram in examPrograms) { if (dataService.Delete <ExamProgram>(examProgram) != 1) { return(StatusCode(500)); } } return(new OkObjectResult(examPrograms)); }
public ActionResult <Course> Delete(int id) { Course result = dataService.FindById <Course>(id); if (result == null) { return(NotFound("Course not found")); } if (dataService.Delete <Course>(result) != 1) { return(StatusCode(500)); } return(new OkObjectResult(result)); }
public ActionResult <Goal> Delete(int id) { Goal result = dataService.FindById <Goal>(id); if (result == null) { return(NotFound("Goal not found")); } if (dataService.Delete(result) != 1) { return(StatusCode(500)); } return(new OkObjectResult(result)); }