public async Task <IViewComponentResult> InvokeAsync(SearchModel actualSearchModel) { var categories = await _categoryService.GetMainCategoriesAsync(); SearchModelWithMetadata model = new SearchModelWithMetadata(actualSearchModel) { PropertyInputs = actualSearchModel.PropertyInputs, MainCategories = categories.ToList() }; return(View("Filter", model)); }
public async Task <IViewComponentResult> InvokeAsync(bool ShowDetailedSearch) { var categories = await _categoryService.GetMainCategoriesAsync(); SearchModelWithMetadata model = new SearchModelWithMetadata() { MainCategories = categories.ToList(), IsDetailed = ShowDetailedSearch }; return(View("Search", model)); }