Beispiel #1
0
        public SocialAccount MarkAsEnable(int id, bool?ifEnable = true)
        {
            var account = this.Find(id);

            if (account == null)
            {
                throw SocialExceptions.SocialUserIdNotExists(id);
            }
            account.IfEnable = ifEnable.Value;
            this.Update(account);
            return(account);
        }
Beispiel #2
0
        public IList <ConversationDto> FindConversations(int socialUserId)
        {
            SocialUser user = _domainService.Find(socialUserId);

            if (user == null)
            {
                throw SocialExceptions.SocialUserIdNotExists(socialUserId);
            }

            ConversationSearchDto searchDto = new ConversationSearchDto();

            if (user != null)
            {
                searchDto.UserId = user.Id;
                return(_conversationService.Find(searchDto));
            }
            return(null);
        }