public IActionResult CompanySearchResults(SearchReviewViewModel viewModel) { viewModel.SearchResultsCompanies = ShowReviewLogic.SearchCompany(viewModel.SearchWord); return(View("CompanySearchResults", viewModel)); }
public IActionResult SearchResults(SearchReviewViewModel viewModel) { if (viewModel.Rating > 0 && viewModel.Rating < 6) { viewModel.SearchResults = ShowReviewLogic.SearchReviewsByRating(viewModel.Rating, viewModel.SearchWord); } else { viewModel.SearchResults = ShowReviewLogic.SearchReviews(viewModel.SearchWord); } return(View(viewModel)); }
public IActionResult SearchResults(SearchReviewViewModel viewModel) { viewModel.SearchResultsCompanies = ShowReviewLogic.SearchCompany(viewModel.SearchWord); //if (viewModel.Rating > 0 && viewModel.Rating < 6) //{ // viewModel.SearchResults = ShowReviewLogic.SearchReviewsByRating(viewModel.Rating, viewModel.SearchWord); //} //else //{ // viewModel.SearchResults = ShowReviewLogic.SearchReviews(viewModel.SearchWord); //} return(View(viewModel)); }