Ejemplo n.º 1
0
        public ActionResult Index(int departmentId)
        {
            EmployeeContext employeecontext = new EmployeeContext();
            List<Employee> employees = employeecontext.Employee.Where(emp => emp.DepartmentId == departmentId).ToList();

            return View(employees);
        }
Ejemplo n.º 2
0
        public ActionResult Index()
        {
            EmployeeContext employeeContext = new EmployeeContext();
            List<Department> departments = employeeContext.Departments.ToList();

            return View(departments);
        }
Ejemplo n.º 3
0
        public ActionResult Deatils(int id)
        {
            EmployeeContext employeecontext = new EmployeeContext();
            Employee employee = employeecontext.Employee.Single(emp => emp.employeeId == id);

            return View(employee);
        }