예제 #1
0
 public OrderService(IUserService userService, IShoppingBagService shoppingBagService,
                     IRepository <Order> orderRepository, KeepHomeContext db, IProductService productService)
 {
     this.userService        = userService;
     this.shoppingBagService = shoppingBagService;
     this.orderRepository    = orderRepository;
     this.dbContext          = db;
     this.productService     = productService;
 }
예제 #2
0
        public async Task InvokeAsync(HttpContext context, KeepHomeContext dbContext,
                                      UserManager <KeepHomeUser> userManager, RoleManager <IdentityRole> roleManager)
        {
            if (!dbContext.Roles.Any())
            {
                await this.SeedRoles(userManager, roleManager);
            }
            //if (!dbContext.Products.Any())
            //{
            //    this.SeedLegla(dbContext);
            //    this.SeedMatraci(dbContext);
            //    this.SeedShkafoveZaMivka(dbContext);
            //}

            //if (!dbContext.BlogPosts.Any())
            //{
            //    this.SeedPosts(dbContext);
            //}

            await this.next(context);
        }
예제 #3
0
 public BlogCommentsService(KeepHomeContext dbContext)
 {
     this.dbContext = dbContext;
 }
예제 #4
0
 public BlogPostsService(KeepHomeContext dbContext, IProductService productService)
 {
     this.dbContext      = dbContext;
     this.productService = productService;
 }
예제 #5
0
 public ShoppingBagService(KeepHomeContext db, IProductService productService, IUserService userService)
 {
     this.db             = db;
     this.productService = productService;
     this.userService    = userService;
 }
예제 #6
0
 public ParentCategoryService(KeepHomeContext db)
 {
     this.db = db;
 }
예제 #7
0
 public ChildCategoryService(KeepHomeContext db)
 {
     this.db = db;
 }
예제 #8
0
 public AddressesService(KeepHomeContext dbContext, IUserService userService)
 {
     this.dbContext   = dbContext;
     this.userService = userService;
 }
예제 #9
0
 public ProductService(KeepHomeContext db)
 {
     this.db = db;
 }