// // GET: /Departament/ public ActionResult Index() { EmployeeContext con = new EmployeeContext(); List<Department> dep = con.Departaments.ToList(); return View(dep); }
public ActionResult Details(int id) { EmployeeContext con = new EmployeeContext(); Employee emplo = con.Employees.Single(a=>a.EmployeeId==id); return View(emplo); }
// // GET: /Home/ public ActionResult Index() { EmployeeContext con = new EmployeeContext(); List<Employee> emplo = con.Employees.ToList(); return View(emplo); }
// // GET: /Home/ public ActionResult Index(int departmentId) { EmployeeContext con = new EmployeeContext(); List<Employee> emplo = con.Employees.Where(a=>a.Department_ID==departmentId).ToList(); return View(emplo); }