public FileServiceTests() { _dbContext = DbContextProvider.GetInMemoryDbContext(); _imageStorageServiceMock = new Mock <IImageStorageService>(); _fileService = new FileService( _dbContext, _imageStorageServiceMock.Object); }
public AdminProductsController( JjOnlineStoreDbContext context, IAdminProductsService adminProductsService, IAdminCategoryService adminCategoryService) { _context = context; _adminProductsService = adminProductsService; _adminCategoryService = adminCategoryService; }
public BillingService( JjOnlineStoreDbContext dbContext, IPdfGenerator pdfGenerator, IHostingEnvironment env) : base(dbContext) { _pdfGenerator = pdfGenerator; _env = env; }
public OrdersService( JjOnlineStoreDbContext dbContext, IMapper mapper, IOrderItemsService orderItemsService) : base(dbContext) { Mapper = mapper; _orderItemsService = orderItemsService; }
public OrdersServiceTests() { _dbContext = GetInMemoryDbContext(); _mapperMock = new Mock <IMapper>(); _orderItemsServiceMock = new Mock <IOrderItemsService>(); _ordersService = new OrdersService( _dbContext, _mapperMock.Object, _orderItemsServiceMock.Object); }
public AdminProductsService( JjOnlineStoreDbContext dbContext, IMapper mapper, IFileService fileService, IProductImagesService productImagesService) : base(dbContext) { Mapper = mapper; _fileService = fileService; _productImagesService = productImagesService; }
public ManageService( JjOnlineStoreDbContext dbContext, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IMapper mapper) : base(dbContext) { UserManager = userManager; SignInManager = signInManager; Mapper = mapper; }
public UsersService( JjOnlineStoreDbContext dbContext, UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, IMapper mapper, IShoppingCartService shoppingCartService) : base(dbContext) { UserManager = userManager; SignInManager = signInManager; Mapper = mapper; _shoppingCartService = shoppingCartService; }
public UsersServiceTests() { _dbContext = GetInMemoryDbContext(); _userManagerMock = IdentityMocksProvider.GetMockUserManager(); _mapperMock = new Mock <IMapper>(); _signInManagerMock = IdentityMocksProvider.GetMockSignInManager(); _cartServiceMock = new Mock <IShoppingCartService>(); _usersService = new UsersService( GetInMemoryDbContext(), _userManagerMock.Object, _signInManagerMock.Object, _mapperMock.Object, _cartServiceMock.Object); }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure( IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, JjOnlineStoreDbContext dbContext) { // Database migrations app.UseDatabaseMigration(); if (env.IsDevelopment()) { dbContext.Database.EnsureCreated(); app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Home/Error"); app.UseHsts(); } loggerFactory.AddLogging(Configuration.GetSection("Logging")); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseAuthentication(); app.UseMvc(routes => { routes.MapRoute( name: "areas", template: "{area:exists}/{controller=BaseAdmin}/{action=Index}/{id?}" ); routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); }
public FileService(JjOnlineStoreDbContext dbContext, IImageStorageService imageStorageService) : base(dbContext) { _imageStorageService = imageStorageService; }
public UserViewedItemsService(JjOnlineStoreDbContext dbContext, IMapper mapper) : base(dbContext) { Mapper = mapper; }
public AdminCategoryService(JjOnlineStoreDbContext dbContext, IMapper mapper) : base(dbContext) { Mapper = mapper; }
public CartItemsService(JjOnlineStoreDbContext dbContext, IMapper mapper, ILogger log) : base(dbContext) { Mapper = mapper; _log = log; }
public ProductsService(JjOnlineStoreDbContext dbContext, IMapper mapper) : base(dbContext) { Mapper = mapper; }
protected BaseService(JjOnlineStoreDbContext dbContext) { DbContext = dbContext; }
public ProductImagesService(JjOnlineStoreDbContext dbContext) : base(dbContext) { }
public ShoppingCartService(JjOnlineStoreDbContext dbContext, IMapper mapper) : base(dbContext) { Mapper = mapper; }