public AccountController(WatchShopDbContext context, IWebHostEnvironment hostEnvironment,
                          UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager)
 {
     this._context         = context;
     this._hostEnvironment = hostEnvironment;
     this._userManager     = userManager;
     this._signInManager   = signInManager;
 }
Beispiel #2
0
        public static WatchShopDbContext InitializeContext()
        {
            var options = new DbContextOptionsBuilder <WatchShopDbContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString())
                          .Options;

            var context = new WatchShopDbContext(options);

            return(context);
        }
 public OrderService(WatchShopDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
Beispiel #4
0
 public HomeController(WatchShopDbContext context, IMapper mapper)
 {
     this.context = context;
     this.mapper  = mapper;
 }
Beispiel #5
0
 public CartController(WatchShopDbContext context, ICartService cartService)
 {
     this.context     = context;
     this.cartService = cartService;
 }
Beispiel #6
0
 public PendingOrderController(WatchShopDbContext context, IOrderService orderService)
 {
     this.context      = context;
     this.orderService = orderService;
 }
 private void SeedData(WatchShopDbContext context)
 {
     context.AddRange(GetDummyData());
     context.SaveChanges();
 }
Beispiel #8
0
 public ProductRepository(WatchShopDbContext context, IWebHostEnvironment hostEnvironment)
 {
     this._context         = context;
     this._hostEnvironment = hostEnvironment;
 }
 public ProductController(WatchShopDbContext context, IProductService productService)
 {
     this.context        = context;
     this.productService = productService;
 }
 public CategoryRepository(WatchShopDbContext context)
 {
     this._context = context;
 }
 public OrderDetailRepository(WatchShopDbContext context)
 {
     this._context = context;
 }