public LegacyAssetsService( IProductsRepository productsRepository, IClientProfileSettingsRepository clientProfileSettingsRepository, ICurrenciesRepository currenciesRepository, ITickFormulaRepository tickFormulaRepository, IMarketSettingsRepository marketSettingsRepository, IProductCategoriesRepository productCategoriesRepository, IUnderlyingsCache underlyingsCache, IAssetTypesRepository assetTypesRepository, ILog log, IBrokerSettingsApi brokerSettingsApi, string brokerId, IList <string> assetTypesWithZeroInterestRate) { _productsRepository = productsRepository; _clientProfileSettingsRepository = clientProfileSettingsRepository; _currenciesRepository = currenciesRepository; _tickFormulaRepository = tickFormulaRepository; _marketSettingsRepository = marketSettingsRepository; _productCategoriesRepository = productCategoriesRepository; _underlyingsCache = underlyingsCache; _assetTypesRepository = assetTypesRepository; _log = log; _assetTypesWithZeroInterestRate = assetTypesWithZeroInterestRate; _brokerSettingsApi = brokerSettingsApi; _brokerId = brokerId; }
public UnitOfWork(ISuppliersRepository suppliers, IProductCategoriesRepository productCategories, IProductsRepository products, IProductsDbContext context) { Suppliers = suppliers; ProductCategories = productCategories; Products = products; _context = context; }
public ActionResult Index(string lang) { SinglePage model = new SinglePage(); ISlidersRepository slidersRepository = DependencyResolver.Current.GetService <ISlidersRepository>(); model.Sliders = slidersRepository.GetList().ToList(); IArticleRepository articleRepository = DependencyResolver.Current.GetService <IArticleRepository>(); model.About = articleRepository.GetList().Where(x => x.ArticleCategory == ArticleCategory.About).ToList(); IProductCategoriesRepository productCategoryRepository = DependencyResolver.Current.GetService <IProductCategoriesRepository>(); model.ProductCategories = productCategoryRepository.GetList().Take(3).ToList(); IPortfoliosRepository portfolioRepository = DependencyResolver.Current.GetService <IPortfoliosRepository>(); model.Portfolios = portfolioRepository.GetList().Take(5).ToList(); IContactsRepository contactRepository = DependencyResolver.Current.GetService <IContactsRepository>(); model.Contacts = contactRepository.GetList().ToList(); return(View(model)); }
public CategoryService( ICategoryRepository categoryRepository, IProductCategoriesRepository productCategoriesRepository) { _categoryRepository = categoryRepository; _productCategoriesRepository = productCategoriesRepository; }
public GetProductCategoriesQueryHandler( IMapper mapper, IProductCategoriesRepository productCategoriesRepository) { _mapper = mapper; _productCategoriesRepository = productCategoriesRepository; }
public OnlineStoreDbContext(EntityFrameworkDbContext entityFrameworkDbContext, IProductCategoriesRepository categoriesRepository, IProductsRepository productsRepository) { _entityFrameworkDbContext = entityFrameworkDbContext; _categoriesRepository = categoriesRepository; _productsRepository = productsRepository; }
public CreateProductCategoryCommandHandler( IGuid guid, IMapper mapper, IProductCategoriesRepository productCategoriesRepository) { _guid = guid; _mapper = mapper; _productCategoriesRepository = productCategoriesRepository; }
public UpdateProductCommandHandler(IGuid guid, IMapper mapper, IProductsRepository productsRepository, IProductCategoriesRepository productCategoriesRepository, IMeasuresRepository measuresRepository) { _guid = guid; _mapper = mapper; _productsRepository = productsRepository; _productCategoriesRepository = productCategoriesRepository; _measuresRepository = measuresRepository; }
public AdminCategoriesController( ICategoryService categoryService, IProductService productService, IProductCategoriesRepository productCategoriesRepository) { _categoryService = categoryService; _productService = productService; _productCategoriesRepository = productCategoriesRepository; }
public CategoryService( ICategoryRepository categoryRepository, IProductCategoriesRepository productCategoriesRepository, IMapper mapper) { _categoryRepository = categoryRepository; _productCategoriesRepository = productCategoriesRepository; _mapper = mapper; }
public ActionResult Index() { ProductCategoriesInfo model = new ProductCategoriesInfo(); IProductCategoriesRepository productCategoryRepository = DependencyResolver.Current.GetService <IProductCategoriesRepository>(); model.ProductCategories = productCategoryRepository.GetList().ToList(); return(View(model)); }
public ProductController(IProductRepository ProductRepo, ILoggerFactory loggerFactory, INotesAndDocHelper notesAndDocHelper, IItemServiceHelper ItemsHelper, INotesAndDocHelper NotesAndDoc, IEventRepo eventRepo, IProductCategoriesRepository ProductCategoriesRepository, ICalculationValuesRepository CalculationValuesRepo) { _ItemsHelper = ItemsHelper; _ProductRepo = ProductRepo; _loggerFactory = loggerFactory; _notesAndDocHelper = notesAndDocHelper; _NotesAndDoc = NotesAndDoc; _eventRepo = eventRepo; _ProductCategoriesRepository = ProductCategoriesRepository; _CalculationValuesRepo = CalculationValuesRepo; }
public ProductCategoriesService(IProductCategoriesRepository productCategoriesRepository, IProductCategoryStringService productCategoryStringService, IAuditService auditService, ICqrsMessageSender cqrsMessageSender, IConvertService convertService) { _productCategoriesRepository = productCategoriesRepository; _productCategoryStringService = productCategoryStringService; _auditService = auditService; _cqrsMessageSender = cqrsMessageSender; _convertService = convertService; }
public ActionResult Index(int id) { ProductsInfo model = new ProductsInfo(); IProductCategoriesRepository productCategoryRepository = DependencyResolver.Current.GetService <IProductCategoriesRepository>(); ProductCategory productCategory = productCategoryRepository.GetById(id); model.CategoryName = productCategory.Name; model.CategoryDescription = productCategory.Description; model.Products = productCategory.Products.ToList(); return(View(model)); }
public ProductController(IProductRepository _productRepository, IProductCategoriesRepository _productCategoriesRepository) { productRepository = _productRepository; productCategoriesRepository = _productCategoriesRepository; }
public ProductCategoriesController(IProductCategoriesRepository repository) : base(repository) { this.repository = repository; }
public ProductController(IProductsRepository productRepo, IProductCategoriesRepository categoryRepo, IMapper mapper) { this.productRepo = productRepo; this.mapper = mapper; this.categoryRepo = categoryRepo; }
public static List <ProductCategory> GetProductCategories() { IProductCategoriesRepository repository = DependencyResolver.Current.GetService <IProductCategoriesRepository>(); return(repository.GetList().ToList()); }
public virtual JsonResult GetEntityList(string table, string field) { Table t = (Table)Enum.Parse(typeof(Table), table); Field f = (Field)Enum.Parse(typeof(Field), field); if (t == Table.Articles) { IArticleRepository repository = DependencyResolver.Current.GetService <IArticleRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } if (f == Field.Description) { return(Json(repository.GetList().Select(x => new { x.Id, Name = x.Description }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Certificates) { ICertificatesRepository repository = DependencyResolver.Current.GetService <ICertificatesRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Contacts) { IContactsRepository repository = DependencyResolver.Current.GetService <IContactsRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } if (f == Field.Description) { return(Json(repository.GetList().Select(x => new { x.Id, Name = x.Description }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Images) { IImagesRepository repository = DependencyResolver.Current.GetService <IImagesRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Languages) { ILanguagesRepository repository = DependencyResolver.Current.GetService <ILanguagesRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } } if (t == Table.PortfolioDetails) { IPortfolioDetailsRepository repository = DependencyResolver.Current.GetService <IPortfolioDetailsRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Portfolios) { IPortfoliosRepository repository = DependencyResolver.Current.GetService <IPortfoliosRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } if (f == Field.Description) { return(Json(repository.GetList().Select(x => new { x.Id, Name = x.Description }), JsonRequestBehavior.AllowGet)); } } if (t == Table.ProductCategories) { IProductCategoriesRepository repository = DependencyResolver.Current.GetService <IProductCategoriesRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } if (f == Field.Description) { return(Json(repository.GetList().Select(x => new { x.Id, Name = x.Description }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Products) { IProductsRepository repository = DependencyResolver.Current.GetService <IProductsRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } if (f == Field.Description) { return(Json(repository.GetList().Select(x => new { x.Id, Name = x.Description }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Quotes) { IQuotesRepository repository = DependencyResolver.Current.GetService <IQuotesRepository>(); if (f == Field.Description) { return(Json(repository.GetList().Select(x => new { x.Id, Name = x.Description }), JsonRequestBehavior.AllowGet)); } } if (t == Table.Sliders) { ISlidersRepository repository = DependencyResolver.Current.GetService <ISlidersRepository>(); if (f == Field.Name) { return(Json(repository.GetList().Select(x => new { x.Id, x.Name }), JsonRequestBehavior.AllowGet)); } } return(Json("", JsonRequestBehavior.AllowGet)); }
private static void SetOriginalValue(int entityId, Table t, Field f, Translation translation) { if (t == Table.Articles) { IArticleRepository repository = DependencyResolver.Current.GetService <IArticleRepository>(); Article item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } if (item != null && f == Field.Description) { translation.Original = item.Description; } } if (t == Table.Certificates) { ICertificatesRepository repository = DependencyResolver.Current.GetService <ICertificatesRepository>(); Certificate item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } } if (t == Table.Contacts) { IContactsRepository repository = DependencyResolver.Current.GetService <IContactsRepository>(); Contact item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } if (item != null && f == Field.Description) { translation.Original = item.Description; } } if (t == Table.Languages) { ILanguagesRepository repository = DependencyResolver.Current.GetService <ILanguagesRepository>(); Language item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } } if (t == Table.PortfolioDetails) { IPortfolioDetailsRepository repository = DependencyResolver.Current.GetService <IPortfolioDetailsRepository>(); PortfolioDetail item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } } if (t == Table.Portfolios) { IPortfoliosRepository repository = DependencyResolver.Current.GetService <IPortfoliosRepository>(); Portfolio item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } if (item != null && f == Field.Description) { translation.Original = item.Description; } } if (t == Table.ProductCategories) { IProductCategoriesRepository repository = DependencyResolver.Current.GetService <IProductCategoriesRepository>(); ProductCategory item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } if (item != null && f == Field.Description) { translation.Original = item.Description; } } if (t == Table.Products) { IProductsRepository repository = DependencyResolver.Current.GetService <IProductsRepository>(); Product item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } if (item != null && f == Field.Description) { translation.Original = item.Description; } } if (t == Table.Quotes) { IQuotesRepository repository = DependencyResolver.Current.GetService <IQuotesRepository>(); Quote item = repository.GetById(entityId); if (item != null && f == Field.Description) { translation.Original = item.Description; } } if (t == Table.Sliders) { ISlidersRepository repository = DependencyResolver.Current.GetService <ISlidersRepository>(); Slider item = repository.GetById(entityId); if (item != null && f == Field.Name) { translation.Original = item.Name; } } }
public UpdateProductCategoryCommandHandler(IMapper mapper, IProductCategoriesRepository productCategoriesRepository) { _mapper = mapper; _productCategoriesRepository = productCategoriesRepository; }
public ProductCategoriesBL(IProductCategoriesRepository productCategoriesRepository, IProductsRepository productsRepository) { _productCategoriesRepository = productCategoriesRepository; _productsRepository = productsRepository; }
public ProductCategoriesDomain(IProductCategoriesRepository repository, PaginationPolicy paginationPolicy) { this.repository = repository; this.paginationPolicy = paginationPolicy; }
public ProductCategoriesUow(CpkContext context, IProductCategoriesRepository repository) : base(context) { Repository = repository; }
public RemoveProductCategoryCommandHandler(IProductCategoriesRepository productCategoriesRepository) { _productCategoriesRepository = productCategoriesRepository; }