예제 #1
0
 public PoolAdminController(IPoolRepository poolRepository,
                            IPoolTagRepository poolTagRepository,
                            IPoolCategoryRepository poolCategoryRepository,
                            IUnitOfWork unitOfWork)
 {
     _poolRepository         = poolRepository;
     _poolTagRepository      = poolTagRepository;
     _poolCategoryRepository = poolCategoryRepository;
     _unitOfWork             = unitOfWork;
 }
예제 #2
0
        public HomeController(ICategoryService categoryService,
                              IBlogRepository blogRepository,
                              IPoolCategoryRepository poolCategoryRepository,
                              ICourseRepository courseRepository,
                              IEnrollmentCourseRepository enrollmentCourseRepository,
                              ISkillRepository skillRepository,
                              IUnitOfWork unitOfWork)
        {
            _categoryService            = categoryService;
            _blogRepository             = blogRepository;
            _courseRepository           = courseRepository;
            _skillRepository            = skillRepository;
            _poolCategoryRepository     = poolCategoryRepository;
            _enrollmentCourseRepository = enrollmentCourseRepository;
            _unitOfWork = unitOfWork;
            _courses    = _courseRepository.GetMany(x => x.IsActive &&
                                                    !x.IsDeleted)
                          .OrderBy(x => x.DisplayOrder)
                          .Select(x => new CourseViewModel
            {
                Id          = x.Id,
                Name        = x.Name,
                Alias       = x.Alias,
                Image       = x.Image,
                Description = x.Description
            })
                          .ToList();

            _skill = _skillRepository.GetMany(x => x.IsActive &&
                                              !x.IsDeleted)
                     .Select(x => new SkillViewModel
            {
                Id          = x.Id,
                Name        = x.Name,
                Alias       = x.Alias,
                Image       = x.Image,
                Description = x.Description
            }).ToList();
        }
예제 #3
0
 public PoolController(IPoolRepository poolRepository, IPoolCategoryRepository poolCategoryRepository)
 {
     _poolRepository         = poolRepository;
     _poolCategoryRepository = poolCategoryRepository;
 }