public async Task <ActionResult <Course> > GetCourse(int?id) { if (id == null) { return(NotFound()); } var course = await CoursesService.Detail(id); if (course == null) { return(NotFound()); } return(course); }