//Результаты поиска
 public ViewResult SearchResult(SearchViewModel searchDetails)
 {
     IEnumerable<Product> products = repository.musicInstruments;
     if(searchDetails.Term != null)
          products = products.Where(x => x.General.Name.Contains(searchDetails.Term));
     if (searchDetails.SelectedCategoryId > 0)
         products = products.Where(x => x.Category_Id == searchDetails.SelectedCategoryId);
     return View(products);
 }
        //Полный поиск с учетом категории
        public PartialViewResult Search()
        {
            SearchViewModel model = new SearchViewModel();
            model.Term = "Что нужно найти?";
            model.SelectedCategoryId = 1;
            model.Categories = new SelectList(
                repository.categories.Categories.Select(x => x).ToList(),
                "CategoryId", "CategoryName");

            return PartialView(model);
        }