示例#1
0
        public ICollection <GroupWRoleViewModel> GetAll(int userId)
        {
            var groups = _groupMemberRepository.Get(g => g.UserId == userId).ToList();
            ICollection <GroupWRoleViewModel> groupViewModels = new List <GroupWRoleViewModel>();

            foreach (var group in groups)
            {
                groupViewModels.Add(group.ToViewModel());
            }
            return(groupViewModels);
        }
示例#2
0
 /// <summary>
 /// 是否群主
 /// </summary>
 /// <param name="groupId">群组Id</param>
 /// <param name="userId">用户Id</param>
 /// <returns>是群主返回true,否则返回false</returns>
 public GroupMember GetGroupMember(long memberId)
 {
     return(groupMemberRepository.Get(memberId));
 }
示例#3
0
        public List <GroupMember> GetGroupMember(int userId)
        {
            var data = _repository.Get(c => c.UserId == userId).ToList();

            return(data);
        }