public ShippingZoneService(DataContext db, ICountryService countryService, IRegionService regionService, IShippingMethodService shippingMethodService) { this.db = db; this.countryService = countryService; this.regionService = regionService; this.shippingMethodService = shippingMethodService; }
public TaxZoneService(DataContext db, ITaxRateService taxRateService, ICountryService countryService, IRegionService regionService) { this.db = db; this.taxRateService = taxRateService; this.countryService = countryService; this.regionService = regionService; }
public static void ImportTranslationsCsv(DataContext db, CsvReader csv, TranslationArea area) { while (csv.Read()) { var code = csv.GetField<string>(0); var key = csv.GetField<string>(1); var value = csv.GetField<string>(2); // ToList is called on purpose for case sensitive search var translation = db.Translations.ToList().FirstOrDefault( t => t.LanguageCode == code && t.Key == key && t.Area == area); if (translation == null) { translation = new Translation { LanguageCode = code, Key = key, Value = value, Area = area }; db.Translations.Add(translation); } else { translation.Value = value; } } db.SaveChanges(); TranslationHelper.ClearCache(); }
public PageTemplateController(DataContext db, ISettingService settingService, ITemplateSettingService templateSettingService) : base(db) { this.settingService = settingService; this.templateSettingService = templateSettingService; }
public CategoryDeleter(DataContext db, ICategoryService categoryService, IDeleterService deleterService, ICacheService cacheService) { this.db = db; this.categoryService = categoryService; this.deleterService = deleterService; this.cacheService = cacheService; }
public DataImportController(DataContext db, ICategoryService categoryService, IProductFinder productFinder, IProductService productService) : base(db) { this.categoryService = categoryService; this.productFinder = productFinder; this.productService = productService; }
public ProductService(DataContext db, IProductFinder productFinder, ICategoryService categoryService, IProductSkuService productSkuService, ICacheService cacheService) { this.db = db; this.productFinder = productFinder; this.categoryService = categoryService; this.productSkuService = productSkuService; this.cacheService = cacheService; }
public DataExportService() { // Not using structuremap as dependencies are being disposed too early db = DataContext.Create(); categoryService = new CategoryService(db, null, new CacheService()); productFinder = new ProductFinder(db, categoryService); workProcessService = new WorkProcessService(db); }
public ProductController(DataContext db, IProductFinder productFinder, IDeleterService deleterService, IProductService productService, ITaxClassService taxClassService, ISettingService settingService) : base(db) { this.productFinder = productFinder; this.deleterService = deleterService; this.productService = productService; this.taxClassService = taxClassService; this.settingService = settingService; }
public ShoppingCartController(DataContext db, ICurrentUser currentUser, ISettingService settings, ITaxZoneService taxZoneService, ICustomerService customerService, ITaxRateService taxRateService, IShippingService shippingService, IProductSkuService productSkuService, IProductService productService) : base(db, currentUser) { this.settings = settings; this.taxZoneService = taxZoneService; this.customerService = customerService; this.taxRateService = taxRateService; this.shippingService = shippingService; this.productSkuService = productSkuService; this.productService = productService; }
public OrderController(DataContext db, ICustomerService customerService, IProductFinder productFinder, IShippingService shippingService, ITaxService taxService, ISettingService settingService, IOrderService orderService, IOptionService optionService) : base(db) { this.customerService = customerService; this.productFinder = productFinder; this.shippingService = shippingService; this.taxService = taxService; this.settingService = settingService; this.orderService = orderService; this.optionService = optionService; }
public OperatorService(DataContext db, IUserStore<User> userStore, IRoleStore<IdentityRole, string> roleStore) { this.db = db; userManager = new UserManager<User>(userStore); roleManager = new RoleManager<IdentityRole>(roleStore); if (_operatorRoleId == null) { lock (padlock) { if (_operatorRoleId == null) { // ReSharper disable PossibleMultipleWriteAccessInDoubleCheckLocking _operatorRoleId = roleManager.FindByName(User.OPERATOR_ROLE).Id; // ReSharper restore PossibleMultipleWriteAccessInDoubleCheckLocking } } } }
public CustomerService(DataContext db, IUserStore<User> userStore, IRoleStore<IdentityRole, string> roleStore,IDeleterService deleteService) { this.db = db; this.deleteService = deleteService; userManager = new UserManager<User>(userStore); if (_customerRoleID == null) { lock (padlock) { if (_customerRoleID == null) { var roleManager = new RoleManager<IdentityRole>(roleStore); // ReSharper disable PossibleMultipleWriteAccessInDoubleCheckLocking _customerRoleID = roleManager.FindByName(User.CUSTOMER_ROLE).Id; // ReSharper restore PossibleMultipleWriteAccessInDoubleCheckLocking } } } }
public ProductFinder(DataContext db, ICategoryService categoryService) { this.db = db; this.categoryService = categoryService; }
public OrderService(DataContext db) { this.db = db; }
public BlogPostCommentService(DataContext db) { this.db = db; }
public SettingController(DataContext db, ISettingService settings) : base(db) { this.settings = settings; }
public PaymentHelper(DataContext db, OrderHelper orderHelper) { this.db = db; this.orderHelper = orderHelper; }
public TranslationController(DataContext db, ICacheService cacheService) : base(db) { this.cacheService = cacheService; }
public CustomerController(DataContext db, ICustomerService customerService) : base(db) { this.customerService = customerService; }
// GET: /Admin/EmailTemplate/ public EmailTemplateController(DataContext db) : base(db) { }
public CountryService(DataContext db, IRegionService regionService) { this.regionService = regionService; this.db = db; }
public ProductSkuService(DataContext db) { this.db = db; }
public const int CACHE_DURATION = 30 * 60 * 60; // 30 minutes public ReportController(DataContext db) : base(db) { }
public WorkProcessService(DataContext db) { this.db = db; }
public RegionService(DataContext db) { this.db = db; }
public PaymentController(DataContext db) : base(db) { }
public ContentPageController(DataContext db, ICacheService cacheService) : base(db) { this.cacheService = cacheService; }
public UploadController(DataContext db) : base(db) { }
public CurrentUser(IIdentity identity, DataContext db) { this.identity = identity; this.db = db; }