Exemplo n.º 1
0
        public async Task <IActionResult> Search(string SearchWord)
        {
            var departement = iDepatementService.FindBy(SearchWord);

            if (departement == null)
            {
                departement = new Departements();
                ModelState.AddModelError("CustomError", "Not Found");
                return(View(departement));
            }
            ViewBag.Count = departement.Employees.Count();
            return(View(departement));
        }