예제 #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");
        }
예제 #2
0
        public ActionResult Create(Employee employee)
        {
            EmployeeContext employeeContext = new EmployeeContext();

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

            return RedirectToAction("Index");

        }