Пример #1
0
        //--------------------------------------------------------------------------
        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);
        }
Пример #2
0
 //--------------------------------------------------------------------------
 public List <Group> Query(string name)
 {
     return(GroupsDao.Query(name));
 }