Ejemplo n.º 1
0
        public ActionResult Edit(Employee employee)
        {
            EmployeeContext employeeContext = new EmployeeContext();
            employeeContext.Entry(employee).State = System.Data.Entity.EntityState.Modified;
            employeeContext.SaveChanges();

            return RedirectToAction("Index");
        }
Ejemplo n.º 2
0
        public ActionResult Create(Employee employee)
        {
            EmployeeContext employeeContext = new EmployeeContext();

            employeeContext.Employees.Add(employee);
            employeeContext.SaveChanges();

            return RedirectToAction("Index");

        }