public FilesViewModel(IFilesRepository filesRepository, IAuthStore authStore, IProductsRepository productsRepository, Func<CreateFileViewModel> createFactory, Func<EditFileViewModel> editFactory) { this.filesRepository = filesRepository; this.productsRepository = productsRepository; this.createFactory = createFactory; this.editFactory = editFactory; var token = authStore.LoadToken(); if (token != null) { IsEditor = token.IsEditor(); IsAdmin = token.IsAdmin(); } cvs = new CollectionViewSource(); items = new ObservableCollection<FileDescription>(); cvs.Source = items; cvs.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); cvs.SortDescriptions.Add(new SortDescription("Id", ListSortDirection.Ascending)); editRequest = new InteractionRequest<IConfirmation>(); BrowseCommand = new DelegateCommand(Browse); EditCommand = new DelegateCommand<FileDescription>(Edit); deleteCommand = new DelegateCommand(PromtDelete, HasSelectedItems); deleteRequest = new InteractionRequest<Confirmation>(); }
public NorthwindUnitOfWork() { _dbContext = new NorthwindSlim(); _productsRepository = new ProductsRepository(_dbContext); _customersRepository = new CustomersRepository(_dbContext); _ordersRepository = new OrdersRepository(_dbContext); }
public ProductsController(IProductsRepository productsRepository) { this.productsRepository = productsRepository; // productsRepository = new FakeProductsRepository(); // string connectionString = @"Server=.\SQLEXPRESS;Database=SportsStore;Trusted_Connection=yes;"; // productsRepository = new SqlSportsRepository(connectionString); }
public MainViewModel(IEventAggregator eventAggregator, ISignalRClient signalRClient, IAuthStore authStore, IProductsRepository productsRepository) { this.eventAggregator = eventAggregator; this.signalRClient = signalRClient; this.productsRepository = productsRepository; deleteRequest = new InteractionRequest<Confirmation>(); CreateProductCommand = new DelegateCommand(CreateProduct); OpenProductCommand = new DelegateCommand<Product>(EditProduct); changePriceCommand = new DelegateCommand(ChangePrice, HasSelectedProducts); deleteCommand = new DelegateCommand(PromtDelete, HasSelectedProducts); cvs = new CollectionViewSource(); items = new ObservableCollection<Product>(); cvs.Source = items; cvs.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); cvs.SortDescriptions.Add(new SortDescription("Size", ListSortDirection.Ascending)); var token = authStore.LoadToken(); if (token != null) { IsEditor = token.IsEditor(); IsAdmin = token.IsAdmin(); } }
public OrderOperations() { _orderRepository = OrderRepositoryFactory.CreateOrderRepository(); _productsRepository = ProductsRepositoryFactory.CreateProductsRepository(); _statesRepository = StatesRepositoryFactory.CreateStatesRepository(); _response = new Response(); }
public ManageProductsController(IProductsRepository productsRepository, ICategoryRepository categoryRepository, IManufacturersRepository manufacturerRepository, IProductImagesRepository productImagesRepository) { _productsRepository = productsRepository; _categoryRepository = categoryRepository; _manufacturerRepository = manufacturerRepository; _productImagesRepository = productImagesRepository; }
public RecommendationController(ICustomerRepository customerRepository, IProductsRepository productsRepository, IPromotionsRepository promotionsRepository, ITelemetryRepository telemetryRepository) { // Setup Fields _customerRepository = customerRepository; _productsRepository = productsRepository; _promotionsRepository = promotionsRepository; _telemetryRepository = telemetryRepository; }
public ChangePriceWindowViewModel(IProductsRepository repository, IEventAggregator eventAggregator) { this.repository = repository; this.eventAggregator = eventAggregator; SaveCommand = new DelegateCommand(Save); CancelCommand = new DelegateCommand(() => IsWindowOpen = false); }
public DashboardFlow(IContextProvider contextProvider, IStateProvider stateProvider) { _userContextProvider = new UserContextProvider(stateProvider, contextProvider); _productsApi = new ProductsApi(contextProvider); _productsRepository = new ProductsRepository(); _userCatalogProvider = new UserCatalogProvider(contextProvider, stateProvider); }
protected BaseController( ICategoryRepository categoryRepository, IManufacturersRepository manufacturersRepository, IProductsRepository productsRepository) { _catRepo = categoryRepository; _manufacturersRepository = manufacturersRepository; _productsRepository = productsRepository; }
public PrecalculatedDashboardFlow(IContextProvider contextProvider, IStateProvider stateProvider) { _productScoreCalculator = new ProductScoreCalculator(contextProvider, stateProvider); _offlineTokenProvider = new OfflineTokenProvider(contextProvider); _platformTokenProvider = new PlatformTokenProvider(contextProvider); _catalogsRepository = new CatalogsRepository(); _productsRepository = new ProductsRepository(); }
protected BaseController( ICategoryRepository categoryRepository, IManufacturersRepository manufacturersRepository, IProductsRepository productsRepository) { CatRepo = categoryRepository; ManufacturersRepository = manufacturersRepository; ProductsRepository = productsRepository; AutoLoginRememberedUser(); }
public ProductEditViewModel(IProductsRepository repository, IEventAggregator eventAggregator, IAuthStore authStore, AttachmentsViewModel attachmentsViewModel) { this.repository = repository; this.eventAggregator = eventAggregator; this.authStore = authStore; this.attachmentsViewModel = attachmentsViewModel; SaveCommand = new DelegateCommand<ChildWindow>(Save); TabLoadedCommand = new DelegateCommand<object>(OnTabLoaded); }
public ShoppingCartModel() { INhibernateConnection connection = new NHibernateConnection(); ISessionFactory sessionFactory = connection.CreateSessionFactory(); ISession _session = sessionFactory.OpenSession(); _cartRepo = new ShoppingCartRepository(connection); _orderRepo = new OrdersRepository(connection); _orderDetailsRepo = new OrderDetailsRepository(connection); _producRepo = new ProductsRepository(connection); }
public ProductBO(IProductsRepository productsRepository , IProductCategoryRepository categoriesRepository , IProductSubcategoryRepository subcategoriesRepository) { _productsRepository = productsRepository; _categoriesRepository = categoriesRepository; _subcategoriesRepository = subcategoriesRepository; InitMaps(); }
public HomeController( ICategoryRepository catRepo, IProductsRepository productRepo, IManufacturersRepository manufacturerRepo) : base(catRepo,manufacturerRepo,productRepo) { homeLogic = new Home(_productsRepository); ViewBag.Categories = GetCategories(); ViewBag.Manufacturers = GetManufacturers(); ViewBag.CategorySelectList = GetCategoryList(); }
public LicensesRepository(ScutexEntities db, IFeaturesRepository featuresRepository, IProductsRepository productsRepository, ILicenseSetsRepository licenseSetsRepository, ITrialSettingsRepository trialSettingsRepository, IServicesRepository servicesRepository) { this.db = db; _featuresRepository = featuresRepository; _productsRepository = productsRepository; _licenseSetsRepository = licenseSetsRepository; _trialSettingsRepository = trialSettingsRepository; _servicesRepository = servicesRepository; }
public HomeController( ICustomerRepository customerRepository, IProductsRepository productsRepository, IPromotionsRepository promotionsRepository, ITelemetryRepository telemetryRepository) { _customerRepository = customerRepository; _productsRepository = productsRepository; _promotionsRepository = promotionsRepository; _telemetryRepository = telemetryRepository; }
public void SetUp() { _repo = ProductsRepositoryFactory.CreateProductsRepository(); _products = new[] { "Carpet,2.25,2.10", "Laminate,1.75,2.10", "Tile,3.50,4.15", "Wood,5.15,4.75" }; }
public ChangePriceViewModel(IEnumerable<Product> products, IProductsRepository repository, IEventAggregator eventAggregator) { this.repository = repository; this.eventAggregator = eventAggregator; SaveCommand = new DelegateCommand(Save); CancelCommand = new DelegateCommand(() => IsWindowOpen = false); LoadItems(products); UpdatePrice(); }
public void Initialize() { _repository = new EFProductRepository(); //HttpContext.Current = new HttpContext(new HttpRequest("", "http://tempuri.org", ""), new HttpResponse(new StringWriter())); //// User is logged in //HttpContext.Current.User = new GenericPrincipal(new GenericIdentity("username"), new string[0]); //// User is logged out //HttpContext.Current.User = new GenericPrincipal(new GenericIdentity(String.Empty), new string[0]); }
public AttachmentsViewModel(IFilesRepository filesRepository, IProductsRepository productsRepository) { this.filesRepository = filesRepository; this.productsRepository = productsRepository; BrowseCommand = new DelegateCommand(Browse); OpenFileCommand = new DelegateCommand<FileDescription>(OpenFile); Files = new ObservableCollection<FileDescription>(); //openDetailRequest = new InteractionRequest<AttachmentDetailViewModel>(); deleteCommand = new DelegateCommand(PromtDelete, CanDelete); //deleteRequest = new InteractionRequest<Confirmation>(); }
public OfferController( ICategoryRepository catRepo, IProductsRepository productRepo, IManufacturersRepository manufacturersRepository) : base(catRepo,manufacturersRepository,productRepo) { offerLogic = new Offer(_productsRepository); ViewBag.Categories = GetCategories(); ViewBag.Manufacturers = GetManufacturers(); ViewBag.CategorySelectList = GetCategoryList(); ViewData["SearchOptions"] = new SelectList(Common.GetSortOptions(), "Id", "Name", 1); }
public ProductPickerViewModel(IProductsRepository productsRepository) { this.productsRepository = productsRepository; CancelCommand = new DelegateCommand(Close); PickCommand = new DelegateCommand(Pick); items = new ObservableCollection<ProductName>(); cvs = new CollectionViewSource { Source = items }; cvs.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending)); Title = "Товарные позиции"; }
public ProductsController( INhibernateConnection connection, IProductsRepository repo, ICategoryRepository categoryRepo, IManufacturersRepository manufacturersRepo, IProductImagesRepository productImageRepo ) { _productRepo = repo; ISessionFactory sessionFactory = connection.CreateSessionFactory(); _session = sessionFactory.OpenSession(); _categoryRepo = categoryRepo; _manufacturersRepo = manufacturersRepo; _productImagesRepository = productImageRepo; }
public ProductController( IProductImagesRepository productImageRepo, IProductsRepository productsRepo, ICategoryRepository catRepo, IManufacturersRepository manufacturersRepository) : base(catRepo,manufacturersRepository,productsRepo) { _productLogic = new Product(productsRepo); _productImagesRepository = productImageRepo; ViewBag.Categories = GetCategories(); ViewBag.Manufacturers = GetManufacturers(); ViewBag.CategorySelectList = GetCategoryList(); ViewData["SearchOptions"] = new SelectList(Common.GetSortOptions(), "Id", "Name", 1); }
public SetupController(ICategoryRepository catRepo, IOrderDetailsRepository orderDetailsRepository, IOrdersRepository orderRepo, IManufacturersRepository manuRepo, IProductImagesRepository productImgRepo, IUserRepository userRepo, INhibernateConnection conn, IProductsRepository productRepo, IDeliveryTypesRepository deliveryRepo) { _manuRepo = manuRepo; _productRepo = productRepo; _catRepo = catRepo; _productImagesRepository = productImgRepo; _userRepo = userRepo; _ordersRepository = orderRepo; _orderDetailsRepository = orderDetailsRepository; _deliveryRepo = deliveryRepo; _session = conn.CreateSessionFactory().OpenSession(); }
//private readonly AttachmentsViewModel attachmentsViewModel; public ProductEditWindowViewModel(IProductsRepository repository, IEventAggregator eventAggregator, IAuthStore authStore/*, AttachmentsViewModel attachmentsViewModel*/) { this.repository = repository; this.eventAggregator = eventAggregator; //this.attachmentsViewModel = attachmentsViewModel; var token = authStore.LoadToken(); if (token != null) { canSave = token.IsEditor(); canEditPrice = token.IsAdmin(); } SaveCommand = new DelegateCommand(Save, () => canSave); CancelCommand = new DelegateCommand(() => IsWindowOpen = false); }
public DeleteModel(IProductsRepository db, IFilesRepository fileRepository) { _db = db; _fileRepository = fileRepository; }
public ProductsController(IProductsRepository productsRepository) { _productsRepository = productsRepository; }
protected override async Task ExecuteAsync(CancellationToken stoppingToken) { using (IServiceScope scope = _provider.CreateScope()) { Debug.Write($"InicializadorAPI Iniciando..."); _logService.SendMessagesAsync("StoreCatalog Iniciando InitializeCheck"); List <Store> stores = new List <Store>(); stores.AddRange(new List <Store> { new Store { Name = "California - Pasadena", StoreId = new Guid("8048e9ec-80fe-4bad-bc2a-e4f4a75c834e") }, new Store { Name = "Los Angeles - Beverly Hills", StoreId = new Guid("8d618778-85d7-411e-878b-846a8eef30c0") } }); _productsRepository = scope.ServiceProvider.GetRequiredService <IProductsRepository>(); _productionRepository = scope.ServiceProvider.GetRequiredService <IProductionRepository>(); _storeRepository = scope.ServiceProvider.GetRequiredService <IStoreRepository>(); _apiService = scope.ServiceProvider.GetRequiredService <IApiService>(); List <Production.Contract.Production> areas = _apiService.GetProductionAreas().Result; var store = stores.Find(x => x.Name.Contains(_appSettings.LojaSettings.Nome)); var productions = _mapper.Map <IEnumerable <Model.Production> >(areas); var products = _mapper.Map <IEnumerable <Product> >(_apiService.GetProducts(_appSettings.LojaSettings.Nome).Result); if (products != null) { foreach (var item in products) { _productsRepository.Create(item); } } else { _logService.SendMessagesAsync( JsonConvert.SerializeObject(HttpStatusCode.ServiceUnavailable)); } if (store != null) { _storeRepository.Create(store); } else { _logService.SendMessagesAsync( JsonConvert.SerializeObject(HttpStatusCode.ServiceUnavailable)); } if (productions != null) { foreach (var item in productions) { _productionRepository.Create(item); } } else { _logService.SendMessagesAsync( JsonConvert.SerializeObject(HttpStatusCode.ServiceUnavailable)); } StoreCatalogReady storeCatalogReady = new StoreCatalogReady() { Ready = true, StoreId = store.StoreId }; _storeCatalogReadyService.SendMessagesAsync(JsonConvert.SerializeObject(storeCatalogReady)); _logService.SendMessagesAsync("StoreCatalog Finalizando InitializeCheck"); stoppingToken.Register(() => Debug.Write($" InicializadorAPI Parando")); } }
public ProductsServices(IProductsRepository repo, IMapper autoMapper) { _autoMapper = autoMapper; productsRepository = repo; }
public ProductsService(IProductsRepository productRepo, IMapper mapper) { _productRepo = productRepo; _mapper = mapper; }
public ProductsViewModel(IProductsRepository productsRepository) { _productsRepository = productsRepository; }
public LocationController(ILocationRepo locationRepo, ICustomerRepository customerRepo, IProductsRepository productsRepo, IOrdersRepository ordersRepo) { LocRepo = locationRepo; CusRepo = customerRepo; ProdRepo = productsRepo; OrdRepo = ordersRepo; }
public ProductController(IProductsRepository productRepository) { this.repository = productRepository; }
public NavController(IProductsRepository repo) { _repository = repo; }
public ProductsController(IProductsRepository productsRepository, ILoggerService loggerService, IUrlHelper urlHelper) { _productsRepository = productsRepository; _logger = loggerService; _urlHelper = urlHelper; }
public ProductController(IProductsRepository repo, IWarehouseRepository houseRepo, UserManager <ApplicationUser> userManager) { _repo = repo; _houseRepo = houseRepo; _userManager = userManager; }
public CartController(IProductsRepository repo, IOrderProcessor proc) { repository = repo; orderProcessor = proc; }
public AdminController(IProductsRepository productsRepository) { this.productsRepository = productsRepository; }
public CartController(IProductsRepository repo, IOrderProcessor processor) { this.repository = repo; this.orderProcessor = processor; }
public ProductsController(IProductsRepository productsRepository, ILogger <ProductsController> logger) { _productsRepository = productsRepository; _logger = logger; }
public ProductsQueries(IProductsRepository productsRepository) { this.productsRepository = productsRepository; }
public ProductsController(ICategoriesRepository categoriesRepository, ICountriesRepository countriesRepository, IProductsRepository productsRepository, ModelValidations modelValidations, ImageUploader imageUploader) { _productsRepository = productsRepository; _countriesRepository = countriesRepository; _categoriesRepository = categoriesRepository; _modelValidations = modelValidations; _imageUploader = imageUploader; }
public ProductDeletedHandler(ICartsRepository cartsRepository, IProductsRepository productsRepository) { _cartsRepository = cartsRepository; _productsRepository = productsRepository; }
public ProductsService(ILogger <ProductsService> logger, IProductsRepository productsRepository) : base(logger, nameof(ProductsService)) { _productsRepository = productsRepository ?? throw new ArgumentNullException(nameof(productsRepository)); }
public MockNorthwindUnitOfWork(IProductsRepository productsRepository) { ProductsRepository = productsRepository; }
public ProductController(IProductsRepository productsRepositoryParam) { _productsRepository = productsRepositoryParam; }
public PaginationService(IProductsRepository repository) { this._repository = repository; }
public ProductsController() { db = SQLiteRegistration.GetRepository(this); }
public StoreController(IPartsUnlimitedContext context, IMemoryCache memoryCache, IProductsRepository productsRepository, ITextAnalyticsService textAnalyticsService) { _db = context; _cache = memoryCache; this.productsRepository = productsRepository; this.textAnalyticsService = textAnalyticsService; }
public AdminController(IProductsRepository repo) { repository = repo; }
public ChannelEngineRepositoryWrapper(IOrdersRepository ordersRepository, IProductsRepository productsRepository) { Orders = ordersRepository; Products = productsRepository; }
public ProductsService(IProductsRepository productsRepo, IMapper autoMapper) { _productsRepo = productsRepo; _autoMapper = autoMapper; }
public ProductService(IProductsRepository productsRepository) { _productsRepository = productsRepository; }
public CartController(IProductsRepository repo, IOrderProcessor proc) { repository = repo; orderProcessor = proc; }
public HomeController(ILogger <HomeController> logger, IProductsRepository repository) { _logger = logger; _productsRepository = repository; }
public ProductController(IProductsRepository productRepository) { this.repository = productRepository; }
public OrderService(IProductsRepository productsRepository) { _productsRepository = productsRepository; }