public ComponentsController(
     CPUWatercoolerRepository cpuWatercoolerRepository,
     FanRepository fanRepository,
     GraphicsCardRepository graphicsCardRepository,
     HardDriveRepository hardDriveRepository,
     MotherboardRepository motherboardRepository,
     OtherRepository otherRepository,
     PCCaseRepository pcCaseRepository,
     PowerSupplyRepository powerSupplyRepository,
     ProcessorRepository processorRepository,
     RAMRepository ramRepository)
 {
     this._cpuWatercoolerRepository = cpuWatercoolerRepository;
     this._fanRepository            = fanRepository;
     this._graphicsCardRepository   = graphicsCardRepository;
     this._hardDriveRepository      = hardDriveRepository;
     this._motherboardRepository    = motherboardRepository;
     this._otherRepository          = otherRepository;
     this._pcCaseRepository         = pcCaseRepository;
     this._powerSupplyRepository    = powerSupplyRepository;
     this._processorRepository      = processorRepository;
     this._ramRepository            = ramRepository;
 }
Ejemplo n.º 2
0
        public EFUnitOfWork(ApplicationContext db, Microsoft.Extensions.Options.IOptions <Microsoft.AspNetCore.Identity.IdentityOptions> optionAccessor, Microsoft.AspNetCore.Identity.IPasswordHasher <ApplicationUser> passwordHasher, IEnumerable <Microsoft.AspNetCore.Identity.IUserValidator <ApplicationUser> > userValidators, IEnumerable <Microsoft.AspNetCore.Identity.IPasswordValidator <ApplicationUser> > passwordValidators, Microsoft.AspNetCore.Identity.ILookupNormalizer keyNormalizer, Microsoft.AspNetCore.Identity.IdentityErrorDescriber errors, IServiceProvider servises, Microsoft.Extensions.Logging.ILogger <Microsoft.AspNetCore.Identity.UserManager <ApplicationUser> > logger, IEnumerable <Microsoft.AspNetCore.Identity.IRoleValidator <ApplicationRole> > roleValidators, Microsoft.Extensions.Logging.ILogger <Microsoft.AspNetCore.Identity.RoleManager <ApplicationRole> > roleLogger)
        {
            this.db = db;

            #region User repositories

            ApplicationUsers      = new ApplicationUserManager(new UserStore <ApplicationUser>(db), optionAccessor, passwordHasher, userValidators, passwordValidators, keyNormalizer, errors, servises, logger);
            Roles                 = new ApplicationRoleManager(new RoleStore <ApplicationRole>(db), roleValidators, keyNormalizer, errors, roleLogger);
            UserProfiles          = new UserProfileRepository(db);
            Comments              = new CommentRepository(db);
            ComputerAssemblyRates = new ComputerAssemblyRateRepository(db);

            #endregion

            #region Infrastructure repositories

            ComputerAssemblies = new ComputerAssemblyRepository(db);
            Manufacturers      = new ManufacturerRepository(db);
            Softwares          = new SoftwareRepository(db);
            Developers         = new DeveloperRepository(db);
            Publishers         = new PublisherRepository(db);
            Countries          = new CountryRepository(db);

            #endregion

            #region Specification repositories

            CPUSockets                       = new CPUSocketRepository(db);
            GPUs                             = new GPURepository(db);
            GraphicMemoryTypes               = new GraphicMemoryTypeRepository(db);
            MotherBoardFormFactors           = new MotherBoardFormFactorRepository(db);
            MotherBoardNorthBridges          = new MotherBoardNorthBridgeRepository(db);
            OuterMemoryFormFactors           = new OuterMemoryFormFactorRepository(db);
            OuterMemoryInterfaces            = new OuterMemoryInterfaceRepository(db);
            PowerSupplyCPUInterfaces         = new PowerSupplyCPUInterfaceRepository(db);
            PowerSupplyMotherBoardInterfaces = new PowerSupplyMotherBoardInterfaceRepository(db);
            RAMTypes                         = new RAMTypeRepository(db);
            RequirementTypes                 = new RequirementTypeRepository(db);
            VideoCardInterfaces              = new VideoCardInterfaceRepository(db);
            #endregion

            #region Joins repositories

            ComputerAssemblyHDDs                = new ComputerAssemblyHDDRepository(db);
            ComputerAssemblyRAMs                = new ComputerAssemblyRAMRepository(db);
            ComputerAssemblySSDs                = new ComputerAssemblySSDRepository(db);
            ComputerAssemblyVideoCards          = new ComputerAssemblyVideoCardRepository(db);
            MotherBoardOuterMemorySlots         = new MotherBoardOuterMemorySlotRepository(db);
            MotherBoardRAMSlots                 = new MotherBoardRAMSlotRepository(db);
            MotherBoardPowerSupplySlots         = new MotherBoardPowerSupplySlotRepository(db);
            MotherBoardVideoCardSlots           = new MotherBoardVideoCardSlotRepository(db);
            PCCaseMotherBoardFormFactors        = new PCCaseMotherBoardFormFactorRepository(db);
            PCCaseOuterMemoryFormFactors        = new PCCaseOuterMemoryFormFactorRepository(db);
            PowerSupplyPowerSupplyCPUInterfaces = new PowerSupplyPowerSupplyCPUInterfaceRepository(db);
            SoftwareCPURequirements             = new SoftwareCPURequirementRepository(db);
            SoftwareVideoCardRequirements       = new SoftwareVideoCardRequirementRepository(db);
            #endregion

            #region Hardware Repositories

            CPUs          = new CPURepository(db);
            HDDs          = new HDDRepository(db);
            MotherBoards  = new MotherBoardRepository(db);
            PCCases       = new PCCaseRepository(db);
            PowerSupplies = new PowerSupplyRepository(db);
            RAMs          = new RAMRepository(db);
            SSDs          = new SSDRepository(db);
            VideoCards    = new VideoCardRepository(db);

            #endregion
        }
 public PCCasesController(PCCaseRepository repository)
 {
     this._repository = repository;
 }