// DELETE /api/students/ public IHttpActionResult DeleteStudent(int id) { studentsService = new StudentsService(); studentsService.DeleteStudent(id); // delete all student subjects List <StudentToExpose> allStudents = studentsService.GetAllEnrolledStudents(); return(Ok(allStudents)); }
// GET /api/students/ public IHttpActionResult GetEnrolledStudents() { studentsService = new StudentsService(); List <StudentToExpose> allStudents = studentsService.GetAllEnrolledStudents(); if (allStudents.Count() == 0) { return(NotFound()); } return(Ok(allStudents)); }