コード例 #1
0
        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);
        }
コード例 #2
0
ファイル: CourseTypesController.cs プロジェクト: jose2a/ADYC
        public IHttpActionResult Get(int id)
        {
            var courseType = _courseTypeService.Get(id);

            if (courseType != null)
            {
                return(Ok(GetCourseTypeDto(courseType)));
            }

            return(NotFound());
        }