public void SetUp() { var context = new AdycDbContext(); courseService = new CourseService(new CourseRepository(context)); courseTypeService = new CourseTypeService(new CourseTypeRepository(context)); ((CourseService)courseService).CourseTypeService = courseTypeService; internalCT = courseTypeService.Get(internalCTId); externalCT = courseTypeService.Get(externalCTId); }
public IHttpActionResult Get(int id) { var courseType = _courseTypeService.Get(id); if (courseType != null) { return(Ok(GetCourseTypeDto(courseType))); } return(NotFound()); }