public ActionResult Index(int departmentId) { EmployeeContext employeecontext = new EmployeeContext(); List<Employee> employees = employeecontext.Employee.Where(emp => emp.DepartmentId == departmentId).ToList(); return View(employees); }
public ActionResult Index() { EmployeeContext employeeContext = new EmployeeContext(); List<Department> departments = employeeContext.Departments.ToList(); return View(departments); }
public ActionResult Deatils(int id) { EmployeeContext employeecontext = new EmployeeContext(); Employee employee = employeecontext.Employee.Single(emp => emp.employeeId == id); return View(employee); }