public OrderController(IOrderService orderService, IShopCartService shopCartService, ShopCart shopCart) { this.orderService = orderService; this.shopCartService = shopCartService; this.shopCart = shopCart; }
public ShopCartController(IShopCartService shopCartService, ICatalogService catalogService, IOrderService orderService) { _shopCartService = shopCartService; _catalogService = catalogService; _orderService = orderService; }
public void ConfigureServices(IServiceCollection services) { var connectionString = configuration.GetConnectionString("DefaultConnection"); services.AddDbContext <ShopContext>(options => options.UseSqlServer(connectionString)); services.AddScoped <IUnitOfWork, UnitOfWork>(); services.AddScoped <IOrderService, OrderService>(); services.AddScoped <ICarService, CarService>(); services.AddScoped <ICategoryService, CategoryService>(); services.AddScoped <IOrderRepository, OrderRepository>(); services.AddScoped <IShopCartItemRepository, ShopCartItemRepository>(); services.AddScoped <ICarRepository, CarRepository>(); services.AddScoped <ICategoryRepository, CategoryRepository>(); services.AddScoped <IShopCartService, ShopCartService>(); services.AddSingleton <IHttpContextAccessor, HttpContextAccessor>(); services.AddScoped(sp => IShopCartService.GetCart(sp)); services.AddMvc(options => options.EnableEndpointRouting = false); services.AddMemoryCache(); services.AddSession(); }
public ShopCartController(IShopCartService shopCart) { _shopCart = shopCart; }
public ShoppingComponet(IShopCartService shopCartService, IOrderService orderService) { this.shopCartService = shopCartService; this.orderService = orderService; }
public UserService(MyBooksDBContext context, IShopCartService shopCartService) { _context = context; _shopCartService = shopCartService; }
public ShopCartController(IShopCartService shopCartService, LinkGenerator linkGanarator, ILoggerService logger, IUserService userService) { _linkGanarator = linkGanarator; _logger = logger; _shopCartService = shopCartService; }