示例#1
0
        public void delete(securitygroup deleteItem)
        {
            securitygroup selectedItem = db.securitygroups.First(item => item.id == deleteItem.id);

            db.securitygroups.Remove(selectedItem);
            db.SaveChanges();
        }
示例#2
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();
        }
示例#3
0
 public void insert(securitygroup newItem)
 {
     db.securitygroups.Add(newItem);
     db.SaveChanges();
 }
示例#4
0
        public securitygroup selectSingle(securitygroup findItem)
        {
            securitygroup selectedItem = db.securitygroups.SingleOrDefault(item => item.id == findItem.id);

            return(selectedItem);
        }