public CategoryController(ICategoryQuery query, ICategoryCommand command)
        {
            Ensure.Any.IsNotNull(command, nameof(command));
            Ensure.Any.IsNotNull(query, nameof(query));

            _command = command;
            _query   = query;
        }
示例#2
0
 public SaleOrderController(IContextService contextService, ISaleOrderQuery saleQuery, ICategoryQuery categoryQuery, ISaleReportFacade saleReportFacade, IExcel excelService)
 {
     _saleOrderQuery     = saleQuery;
     this._context       = contextService;
     this._categoryQuery = categoryQuery;
     _saleReportFacade   = saleReportFacade;
     this._excelService  = excelService;
 }
示例#3
0
 public ProductController(IContextService context, IQuery query, IProductQuery productQuery, IProductFacade productFacade, ICategoryQuery categoryQuery, ILogger log)
 {
     this._query         = query;
     this._productQuery  = productQuery;
     this._productFacade = productFacade;
     this._categoryQuery = categoryQuery;
     this._context       = context;
     _log = log;
 }
示例#4
0
 public ReportController(IContextService contextService, IReportQuery reportQuery, IQuery query, IPurchaseSaleInventoryFacade psiFacade, ICategoryQuery categoryQuery, IExcel excelService)
 {
     _reportQuery  = reportQuery;
     this._context = contextService;
     _query        = query;
     _purchaseSaleInventoryFacade = psiFacade;
     this._categoryQuery          = categoryQuery;
     this._excelService           = excelService;
 }
示例#5
0
 public SupplierController(IContextService context, IQuery query, ISupplierQuery supplierQuery, ISupplierFacade supplierFacade, IAreaQuery areaQuery, ICategoryQuery _categoryQuery)
 {
     this._context        = context;
     this._query          = query;
     this._supplierQuery  = supplierQuery;
     this._supplierFacade = supplierFacade;
     this._areaQuery      = areaQuery;
     this._categoryQuery  = _categoryQuery;
 }
示例#6
0
 public StoreInventoryController(IContextService contextService, IQuery query, IStoreInventoryQuery storeInventoryQuery, IAreaQuery areaQuery, ICategoryQuery categoryQuery, IExcel iexcel)
 {
     this._query = query;
     this._storeInventoryQuery = storeInventoryQuery;
     this._areaQuery           = areaQuery;
     this._context             = contextService;
     this._categoryQuery       = categoryQuery;
     this._excelService        = iexcel;
 }
示例#7
0
        public ProfileQuery(
            IProfileStore store,
            IProfileCache cache,
            ICategoryQuery query)
        {
            Ensure.Any.IsNotNull(store, nameof(store));
            Ensure.Any.IsNotNull(cache, nameof(cache));
            Ensure.Any.IsNotNull(query, nameof(query));

            _store = store;
            _cache = cache;
            _query = query;
        }
示例#8
0
 public CategoryManagerController(
     ICategoryManager categoryManager,
     INotifiable <DomainNotification> domainNotification,
     INotifiable <CategoryRegistered> categoryRegistered,
     INotifiable <CategoryUpdated> categoryUpdated,
     INotifiable <CategoryRemoved> categoryRemoved,
     ICategoryQuery categoryQuery)
 {
     _categoryManager    = categoryManager;
     _domainNotification = domainNotification;
     _categoryRegistered = categoryRegistered;
     _categoryUpdated    = categoryUpdated;
     _categoryRemoved    = categoryRemoved;
     _categoryQuery      = categoryQuery;
 }
        public ProfileSearchQuery(
            ICategoryQuery query,
            IProfileStore profileStore,
            ICategoryLinkStore linkStore,
            IProfileCache profileCache,
            ICategoryCache cache)
        {
            Ensure.Any.IsNotNull(profileStore, nameof(profileStore));
            Ensure.Any.IsNotNull(linkStore, nameof(linkStore));
            Ensure.Any.IsNotNull(cache, nameof(cache));
            Ensure.Any.IsNotNull(query, nameof(query));
            Ensure.Any.IsNotNull(profileCache, nameof(profileCache));

            _profileStore = profileStore;
            _linkStore    = linkStore;
            _cache        = cache;
            _query        = query;
            _profileCache = profileCache;
        }
        private async Task <bool> ProcessCatAsync(TCat cat, ICategoryQuery <TCat> query)
        {
            cat.Parent = query.Parent ?? await _parentEntityProvider.GetModelParentAsync(cat);

            if (query.LoadLastItems != null)
            {
                cat.Items = await GetCatItemsAsync(cat, (int)query.LoadLastItems);
            }
            if (query.LoadChildren)
            {
                await DBContext.Entry(cat).Collection(x => x.Children).LoadAsync();

                foreach (var child in cat.Children)
                {
                    await ProcessCatAsync(child, query);
                }
            }

            return(true);
        }
示例#11
0
 public ArticleCategoryProcessQuery(ArticleCat cat, ICategoryQuery <ArticleCat> query) : base(cat, query)
 {
 }
 public CategoryWithProductsViewComponent(ICategoryQuery categoryQuery) => _categoryQuery = categoryQuery;
 public CategoryModel(ICategoryQuery categoryQuery) => _categoryQuery = categoryQuery;
示例#14
0
 public CategoryService(ICategoryRepository <ICategory> categoryRepository,
                        ICategoryQuery categoryQuery)
 {
     _categoryRepository = categoryRepository;
     _categoryQuery      = categoryQuery;
 }
示例#15
0
 public CategoryController(ICategoryQuery categoryQuery, ICommandBus commandBus)
 {
     _categoryQuery = categoryQuery;
     _commandBus    = commandBus;
 }
 public GalleryCategoryProcessQuery(GalleryCat cat, ICategoryQuery <GalleryCat> query) : base(cat, query)
 {
 }
示例#17
0
 public CategoryController(IQuery query, ICategoryQuery categoryQuery, ICategoryFacade categoryFacade)
 {
     this._query          = query;
     this._categoryQuery  = categoryQuery;
     this._categoryFacade = categoryFacade;
 }
 public FileCategoryProcessQuery(FileCat cat, ICategoryQuery <FileCat> query) : base(cat, query)
 {
 }
 public MenuViewComponent(IOrderQuery orderQuery, ICategoryQuery categoryQuery, IArticleCategoryQuery articleCategoryQuery)
 {
     _orderQuery           = orderQuery;
     _categoryQuery        = categoryQuery;
     _articleCategoryQuery = articleCategoryQuery;
 }
示例#20
0
 public CategoryRepository(ICategoryCommand categoryCommand, ICategoryQuery categoryQuery)
 {
     _categoryCommand = categoryCommand;
     _categoryQuery   = categoryQuery;
 }
示例#21
0
 protected CategoryProcessQueryBase(TCat cat, ICategoryQuery <TCat> query)
 {
     Cat           = cat;
     CategoryQuery = query;
 }
示例#22
0
 public CategoryViewComponent(ICategoryQuery query) => _query = query;