Exemplo n.º 1
0
        public GroupDto CreateGroup(string adminUserName, string groupName)
        {
            UserIdentity adminUser = m_UserRepository.Set().Where(p => p.UserName == adminUserName).FirstOrDefault();

            Group group = new Group();

            group.GroupAdminUser = adminUser;
            group.Name           = groupName;
            m_GroupRepository.Set().Add(group);
            m_GroupRepository.SaveChanges();

            AddParticipant(groupName, adminUserName);
            return(GroupMapper.MapToDto(group));
        }
Exemplo n.º 2
0
        public GroupDto GetByName(string groupName)
        {
            Group group = m_GroupRepository.Set().Where(p => p.Name == groupName).FirstOrDefault();

            return(group == null ? null : GroupMapper.MapToDto(group));
        }