public async Task <IActionResult> Filter(string CategoryId, string GenderId, string SizeId) { ViewBag.Category = _categoryContext.AllCategories.Select(li => new SelectListItem { Text = li.Name, Value = li.Id.ToString() }); ViewBag.Gender = _gendersContext.AllGenders.Select(li => new SelectListItem { Text = li.Name, Value = li.Id.ToString() }); var searchedItems = await _contextSearch.Filter(CategoryId, GenderId, SizeId); return(View("Index", searchedItems)); }