public void updateDepartment(string id, department d) { department dbd = database.departments.First(data => data.iddepartment == id); dbd = d; database.SaveChanges(); }
public void deleteDepartment(string id) { department d = database.departments.First(data => data.iddepartment == id); database.departments.Remove(d); }
public department getDepartment(string id) { department d = database.departments.First(data => data.iddepartment == id); return(d); }
public void insertDepartment(ref department d) { database.departments.Add(d); database.SaveChanges(); }