public ActionResult Index() { EmployeeContext employeeContext = new EmployeeContext(); List<Employee> employees = employeeContext.Employees.ToList(); return View(employees); }
public ActionResult Details(int id = 1) { EmployeeContext employeeContext = new EmployeeContext(); Employee employee = employeeContext.Employees.Single(emp => emp.EmployeeID == id); return View(employee); }