示例#1
0
 public CheckoutController()
 {
     context          = new ApplicationDbContext();
     carts            = new CartRepository(context);
     customerProfiles = new CustomerProfileRepository(context);
     purchases        = new PurchaseRepository(context);
     products         = new ProductRepository(context);
 }
示例#2
0
 public AdminController()
 {
     context     = new ApplicationDbContext();
     categories  = new CategoryRepository(context);
     products    = new ProductRepository(context);
     purchases   = new PurchaseRepository(context);
     profiles    = new CustomerProfileRepository(context);
     roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(context));
 }
        public CustomerProfileRepositoryTests()
        {
            var mapper = MapperHelper.CreateAutoMapper();

            var contextFixture = new BonusCustomerProfileContextFixture();

            var bonusCustomerProfileContext = contextFixture.BonusCustomerProfileContext;

            var msSqlContextFactory = new MsSqlContextFactory <BonusCustomerProfileContext>(
                dbCtxOptions => bonusCustomerProfileContext, contextFixture.DbContextOptions);

            _customerProfileRepository = new CustomerProfileRepository(msSqlContextFactory, mapper);
        }
 public CustomerController()
 {
     context   = new ApplicationDbContext();
     profiles  = new CustomerProfileRepository(context);
     purchases = new PurchaseRepository(context);
 }
示例#5
0
 public CustomerProfileController(CustomerProfileRepository customerProfileRepository)
 {
     _customerProfileRepository = customerProfileRepository;
 }