Esempio n. 1
0
        public IActionResult Edit(int id, [Bind("ID,Name,LastName,NetWage")] Employee employee)
        {
            if (id != employee.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                EmployeeContext context = HttpContext.RequestServices.GetService(typeof(Employees.Models.EmployeeContext)) as EmployeeContext;
                context.Edit(employee);
            }
            return(View("Details", employee));
        }