//-------------------------------------------------------------------------- private Group Insert(string name) { List <Group> groups = GroupsDao.Query(name); if (groups.Count > 0) { throw new Exception("a group with this name already exists!"); } // check we have the minimal set of meta data Group group = new Group() { Name = name }; GroupsDao.Insert(ref group); _groupCache[group.Id] = group; return(group); }
//-------------------------------------------------------------------------- public List <Group> Query(string name) { return(GroupsDao.Query(name)); }