public IActionResult Details(int id) { List <ViewModelEmployee> data = ViewModelEmployee.GetData(); var result = from item in data where item.Id == id select item; if (result.Count() == 0) { return(NotFound("Сотрудник по Id = " + id.ToString() + " - не найден.")); } return(View(result.First())); }
public IActionResult List() { List <ViewModelEmployee> data = ViewModelEmployee.GetData(); return(View(data)); }