Ejemplo n.º 1
0
 public AdminService(ComputerShopContext context)
 {
     groupRepo              = new GroupRepository(context);
     categoryRepo           = new CategoryRepository(context);
     producentRepo          = new ProducentRepository(context);
     featureRepo            = new FeatureRepository(context);
     featureValueRepo       = new FeatureValueRepository(context);
     featureForCategoryRepo = new FeaturesForCategoryRepository(context);
     productRepo            = new ProductRepository(context);
     featureValueRepo       = new FeatureValueRepository(context);
     userRepo = new UserRepository(context);
     featureValueForProductRepo = new FeatureValueForProductRepository(context);
 }
Ejemplo n.º 2
0
        public void TestInit()
        {
            var options = new DbContextOptionsBuilder <CMSContext>()
                          .UseInMemoryDatabase(databaseName: "Test_DB")
                          .Options;

            var context = new CMSContext(options);

            lampRepository      = new LampRepository(context);
            producentRepository = new ProducentRepository(context);
            verkoopRepository   = new VerkoopRepository(context);
            koperRepository     = new KoperRepository(context);
        }
 public LampsController(CMSContext context)
 {
     lampRepository      = new LampRepository(context);
     producentRepository = new ProducentRepository(context);
 }
 public ProducentenController(CMSContext context)
 {
     producentRepository = new ProducentRepository(context);
 }