public async Task <IActionResult> Search(SearchCriteria search) { if (ModelState.IsValid) { if (search.IsSearching()) { await ClothingDb.BuildSearchQueryAsync(search, _context); return(View(search)); } else { ModelState.AddModelError(string.Empty, "You must search by at least one search criteria"); return(View(search)); } } return(View()); }