public Boolean RemoveGroup(Screengroups groupName) { InitDB(); using (var session = documentStore.OpenSession()) { Screengroups deleteGroup = new Screengroups(); deleteGroup = session.Load<Screengroups>(groupName.Id); session.Delete(deleteGroup); session.SaveChanges(); return true; } return false; }
public Boolean InsertScreenGroup(Screengroups scrg) { InitDB(); using (var session = documentStore.OpenSession()) { Screengroups l = new Screengroups(); l.Name = scrg.Name; l.Description = scrg.Description; session.Store(l); session.SaveChanges(); return true; } return false; }