public MotherboardsController()
     : base()
 {
     motherboardRepository = new MotherboardRepository();
     postRepository = new PostRepository();
     service = new MotherboardService(motherboardRepository, postRepository);
 }
Exemple #2
0
 public HomeController(
     ICPUService cpuService,
     IMotherboardService motherboardService,
     IGPUService gpuService)
 {
     this.cpuService         = cpuService;
     this.motherboardService = motherboardService;
     this.gpuService         = gpuService;
 }
Exemple #3
0
        private void SetUp()
        {
            var services = new ServiceCollection();

            services.AddDbContext <PcPartPickerDbContext>(options =>
                                                          options.UseInMemoryDatabase(Guid.NewGuid().ToString()));

            services.AddScoped <IMotherboardService, MotherboardService>();

            services.AddScoped <IUnitOfWork, UnitOfWork>();

            services.AddScoped <IRepository <Motherboard>, Repository <Motherboard> >();
            IServiceProvider provider = services.BuildServiceProvider();

            _context            = provider.GetService <PcPartPickerDbContext>();
            _motherboardService = provider.GetService <IMotherboardService>();

            _testMotherboards = GetMotherboards();
        }
Exemple #4
0
 public MotherboardsController(IMotherboardService service, IGoogleDriveService driveService)
 {
     _service      = service;
     _driveService = driveService;
 }
 public MotherboardsController(IMotherboardService motherboardService)
 {
     _pcsService = motherboardService;
 }