Пример #1
0
 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();
 }
Пример #2
0
 public void insert(securitygroup newItem)
 {
     db.securitygroups.Add(newItem);
     db.SaveChanges();
 }
Пример #3
0
        public securitygroup selectSingle(securitygroup findItem)
        {
            securitygroup selectedItem = db.securitygroups.SingleOrDefault(item => item.id == findItem.id);

            return selectedItem;
        }
Пример #4
0
 public void delete(securitygroup deleteItem)
 {
     securitygroup selectedItem = db.securitygroups.First(item => item.id == deleteItem.id);
     db.securitygroups.Remove(selectedItem);
     db.SaveChanges();
 }