コード例 #1
0
 public void UpdateEmployeeInfo(Employee Entities)
 {
       using (var context = new WorkScheduleDBContext())
       {
           var updating = context.Employees.Attach(Entities);
           var matchingWithExistingValues = context.Entry<Employee>(updating);
           matchingWithExistingValues.State = System.Data.Entity.EntityState.Modified;
           context.SaveChanges();
       }
 }