public SearchProductsModel(IEnumerable <string> selectedPromTokens, string searchText, SearchProductsBy searchBy, ProductAvailabilityBy availabilityBy)
 {
     SelectedPromTokens = selectedPromTokens;
     SearchText         = searchText;
     SearchBy           = searchBy;
     AvailabilityBy     = availabilityBy;
 }
Exemplo n.º 2
0
        public async Task <IActionResult> GetProducts([FromQuery] List <string> selectedPromTokens, [FromQuery] string searchText, [FromQuery] SearchProductsBy searchBy, [FromQuery] ProductAvailabilityBy availabilityBy)
        {
            var products = await PromService.GetProducts(new SearchProductsModel(selectedPromTokens, searchText, searchBy, availabilityBy));

            return(Ok(products));
        }