public ActionResult Rendering([ModelBinder(typeof(FacetModelBinder))] IList <Facet> facetsForQuerying) { var category = _catalogContext.CurrentCategory; var viewModel = new FacetsRenderingViewModel(); IList <Facet> facets = _catalogLibrary.GetFacets(category.Guid, facetsForQuerying.ToFacetDictionary()); if (facets.Any(x => x.FacetValues.Any(y => y.Count > 0))) { viewModel.Facets = MapFacets(facets); } return(View(viewModel)); }
public ActionResult Rendering([ModelBinder(typeof(FacetModelBinder))] IList <Facet> facetsForQuerying) { var category = _catalogContext.CurrentCategory; var viewModel = new FacetsRenderingViewModel(); IList <Facet> facets = _searchLibraryInternal.GetFacetsFor(category, facetsForQuerying); if (facets.Any(x => x.FacetValues.Any(y => y.Hits > 0))) { viewModel.Facets = MapFacets(facets); } return(View(viewModel)); }