コード例 #1
0
 public void Edit(Department department)
 {
     db.Entry(department).State = EntityState.Modified;
     db.SaveChanges();
 }
コード例 #2
0
        public void Add(Department department)
        {
            db.Departments.Add(department);

            db.SaveChanges();
        }