Пример #1
0
 public ProductService(INumeratorService numerator, IImageService images, ISubcategoryService subcategories, IProductPlacementService placement, ApiDbContext db)
 {
     this.numerator = numerator;
     this.images    = images;
     this.placement = placement;
     this.db        = db;
 }
Пример #2
0
 public SubcategoriesController(ISubcategoryService subcategoryService, ISubcategoryPropertyService subcatPropService, ICategoryService categoryService, IImageService imageService)
 {
     _subcategoryService = subcategoryService;
     _subcatPropService  = subcatPropService;
     _categoryService    = categoryService;
     _imageService       = imageService;
 }
Пример #3
0
        /// <summary>
        /// Generate categories
        /// </summary>
        public CategoryService()
        {
            Task.Run(() => GetJson());

            //This code was beeing used to save the data locally & generate data incase it was empty, we do no longer do this - instead we'll contact an API which returns us a JSON
            //Categories = connection.Table<Category>().ToList();
            //if (Categories.Count == 0)
            //{
            //    GenerateData();
            //    Categories = connection.Table<Category>().ToList();
            //}

            _subcategoryService = new SubcategoryService();

            //Fill in here your subcategory list by using the ISubcategoryService - following method fills the categories up with their subcategories
            GetAllSubcategories();


            foreach (var category in Categories)
            {
                var subcategories = Subcategories.Where(s => s.CategoryId == category.CategoryId).ToList();
                category.Subcategories = subcategories;

                foreach (var subcategory in subcategories)
                {
                    subcategory.Category = category;
                }
            }
        }
Пример #4
0
        public SubcategoryServiceTests()
        {
            var subcategoryRepository = MockInitializer.GetSubcategoryRepository();
            var categoryRepository    = MockInitializer.GetCategoryRepository();
            var unitOfWork            = MockInitializer.GetUnitOfWork();

            _subcategoryService = new SubcategoryService(subcategoryRepository, categoryRepository, unitOfWork);
        }
Пример #5
0
 public ImagesController(ICategoryService categoryService, IImageService imageService, ISubcategoryService subcategoryService, IMakerService makerService, IProductService productService)
 {
     _categoryService    = categoryService;
     _imageService       = imageService;
     _subcategoryService = subcategoryService;
     _makerService       = makerService;
     _productService     = productService;
 }
Пример #6
0
 public ProductDataController(IProductDataService productDataService, ISubcategoryService subcategoryService, IPropertyService propertyService, ISubcategoryPropertyService subcatPropService, IProductService productService)
 {
     _productDataService = productDataService;
     _subcategoryService = subcategoryService;
     _propertyService    = propertyService;
     _subcatPropService  = subcatPropService;
     _productService     = productService;
 }
Пример #7
0
 public AnnouncementsController(
     IAnnouncementService announcementService,
     ISubcategoryService subcategoryService,
     IMapper mapper
     )
 {
     _announcementService = announcementService;
     _subcategoryService  = subcategoryService;
     _mapper = mapper;
 }
Пример #8
0
        public UnitOfWork(ApplicationDbContext context)
        {
            _context               = context;
            BankAccountRepo        = new BankAccountRepository(context);
            CategoryRepo           = new CategoryRepository(context);
            FinancialOperatiosRepo = new FinancialOperationRepository(context);

            BankAccountLogic          = new BankAccountLogic(this);
            FinancialOperationService = new FinancialOperationService(this);
            SubcategoryService        = new SubcategoryService(this);
        }
 public SupplementsController(IManagerSupplementService managerSupplementService, IManagerCategoryService managerCategoryService, IManagerSubcategoryService managerSubcategoryService, IManagerManufacturerService managerManufacturerService, ISupplementService supplementService, ICategoryService categoryService, ISubcategoryService subcategoryService, IManufacturerService manufacturerService)
 {
     this.managerSupplementService   = managerSupplementService;
     this.managerCategoryService     = managerCategoryService;
     this.managerSubcategoryService  = managerSubcategoryService;
     this.managerManufacturerService = managerManufacturerService;
     this.supplementService          = supplementService;
     this.categoryService            = categoryService;
     this.subcategoryService         = subcategoryService;
     this.manufacturerService        = manufacturerService;
 }
 public SubcategoriesController(IManagerSubcategoryService managerSubcategoryService, IManagerCategoryService managerCategoryService, ISubcategoryService subcategoryService)
 {
     this.managerSubcategoryService = managerSubcategoryService;
     this.managerCategoryService    = managerCategoryService;
     this.subcategoryService        = subcategoryService;
 }
Пример #11
0
 public SubcategoriesController(ISubcategoryService subcategoryService)
 {
     this.subcategoryService = subcategoryService;
 }
Пример #12
0
 public LessonController(ILessonService lessonService, ISubcategoryService subcategoryService)
 {
     this.lessonService = lessonService;
     this.subcategoryService = subcategoryService;
 }
 public SubcategoryController()
 {
     subcategoryService = ServiceLocator.GetSubcategoryService();
 }
 /// <summary>
 /// Constructor for controller
 /// </summary>
 /// <param name="subcatPropService">Service for SubcategoryProperties</param>
 /// <param name="propertyService">Service for Properties</param>
 /// <param name="subcategoryService">Service for Subcategory</param>
 public SubcategoryPropertyController(ISubcategoryPropertyService subcatPropService, IPropertyService propertyService, ISubcategoryService subcategoryService)
 {
     _subcatPropService  = subcatPropService;
     _propertyService    = propertyService;
     _subcategoryService = subcategoryService;
 }
Пример #15
0
 public TestController()
 {
     this.subcategoryService = new SubcategoryService();
     this.testService = new TestService();
     this.testResultService = new TestResultService();
 }
Пример #16
0
 public LessonController()
 {
     this.lessonService = new LessonService();
     this.subcategoryService = new SubcategoryService();
 }
Пример #17
0
 public TestController(ITestService testService, ITestResultService testResultService, ISubcategoryService subcategoryService)
 {
     this.subcategoryService = subcategoryService;
     this.testService = testService;
     this.testResultService = testResultService;
 }
Пример #18
0
 public SubcategoryController()
 {
     this.categoryService = new CategoryService();
     this.subcategoryService = new SubcategoryService();
 }
Пример #19
0
 public SubcategoriesController(ISubcategoryService subcategoryService, IMapper mapper) : base(mapper)
 {
     _subcategoryService = subcategoryService;
 }
Пример #20
0
 public SubcategoryController(ICategoryService categoryService, ISubcategoryService subcategoryService)
 {
     this.categoryService = categoryService;
     this.subcategoryService = subcategoryService;
 }
Пример #21
0
 public CategoriesController(ICategoryService categoryService, ISubcategoryService subcategoryService)
 {
     _categoryService    = categoryService;
     _subcategoryService = subcategoryService;
 }
 public SubcategoryController(ISubcategoryService subcategoryService)
 {
     _subcategoryService = subcategoryService;
 }
Пример #23
0
 public SubcategoriesApiController()
 {
     this.subcategoryService = new SubcategoryService();
 }
 public SubcategoryController(ILogger <SubcategoryController> logger, ISubcategoryService subcategoryService)
 {
     _logger = logger ?? throw new ArgumentNullException(nameof(logger));
     this.subcategoryService = subcategoryService;
 }
Пример #25
0
 public SubcategoriesApiController(ISubcategoryService subcategoryService)
 {
     this.subcategoryService = subcategoryService;
 }
 public SubcategoryController(IUserService users, ISubcategoryService subcategories, ISettingsService settings) : base(users, settings)
 {
     this.subcategories = subcategories;
 }
 public SubcategoryController(ISubcategoryService subcategoryService, ILogger <SubcategoryController> logger)
 {
     _logger             = logger;
     _subcategoryService = subcategoryService;
 }