Пример #1
0
        public async Task <IActionResult> Index(string searchQuery)
        {
            IEnumerable <Company> companies;

            if (searchQuery != null)
            {
                companies = await _companiesRep.FindCompaniesByName(searchQuery);
            }
            else
            {
                companies = await _companiesRep.GetCompanies();
            }
            return(View(companies));
        }