Example #1
0
        public virtual async Task <SearchProductAssociationsResponse> Handle(SearchProductAssociationsQuery request, CancellationToken cancellationToken)
        {
            var result = await _productAssociationSearchService.SearchProductAssociationsAsync(_mapper.Map <ProductAssociationSearchCriteria>(request));

            return(new SearchProductAssociationsResponse
            {
                Result = result
            });
        }
        public async Task <ActionResult <ProductAssociationSearchResult> > SearchProductAssociations([FromBody] ProductAssociationSearchCriteria criteria)
        {
            var searchResult = await _productAssociationSearchService.SearchProductAssociationsAsync(criteria);

            var result = new ProductAssociationSearchResult
            {
                Results    = searchResult.Results,
                TotalCount = searchResult.TotalCount
            };

            return(Ok(result));
        }
        public async Task <ActionResult <ProductAssociationSearchResult> > Search([FromBody] ProductAssociationSearchCriteria criteria)
        {
            var result = await _productAssociationSearchService.SearchProductAssociationsAsync(criteria);

            return(Ok(result));
        }