public MotherboardsController() : base() { motherboardRepository = new MotherboardRepository(); postRepository = new PostRepository(); service = new MotherboardService(motherboardRepository, postRepository); }
public HomeController( ICPUService cpuService, IMotherboardService motherboardService, IGPUService gpuService) { this.cpuService = cpuService; this.motherboardService = motherboardService; this.gpuService = gpuService; }
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(); }
public MotherboardsController(IMotherboardService service, IGoogleDriveService driveService) { _service = service; _driveService = driveService; }
public MotherboardsController(IMotherboardService motherboardService) { _pcsService = motherboardService; }