public void Edit(Department department) { db.Entry(department).State = EntityState.Modified; db.SaveChanges(); }
public void Add(Department department) { db.Departments.Add(department); db.SaveChanges(); }