public IActionResult Index() { DataConnector d = new DataConnector(); var e = d.GetAll(); var i = e.Max(emp => emp.Id); i++; Employee newEmpl = new Employee { Id = i, FirstName = "Alex", LastName = "Bean" }; var result = d.Add(newEmpl); return(View()); }