public async Task <IHttpActionResult> GetInstructorWithCourses(int id) { var instructorWithCoursesOut = await _instructorService.GetInstructorWithCourses(id); if (instructorWithCoursesOut != null) { return(new Helpers.ActionResultBuilder .CreateActionResult <InstructorWithCoursesOut>(Request, instructorWithCoursesOut, System.Net.HttpStatusCode.OK)); } else { return(new Helpers.ActionResultBuilder .CreateActionResult <int>(Request, id, System.Net.HttpStatusCode.NotFound)); } }