public void update(securitygroup editItem) { securitygroup selectedItem = db.securitygroups.SingleOrDefault(item => item.id == editItem.id); selectedItem.name = editItem.name; selectedItem.description = editItem.description; db.SaveChanges(); }
public void insert(securitygroup newItem) { db.securitygroups.Add(newItem); db.SaveChanges(); }
public securitygroup selectSingle(securitygroup findItem) { securitygroup selectedItem = db.securitygroups.SingleOrDefault(item => item.id == findItem.id); return selectedItem; }
public void delete(securitygroup deleteItem) { securitygroup selectedItem = db.securitygroups.First(item => item.id == deleteItem.id); db.securitygroups.Remove(selectedItem); db.SaveChanges(); }