Exemple #1
0
        public async Task <IEnumerable <ChatMessageDTO> > GetAllMessagesByGroupId(Guid groupId)
        {
            _logger.Info(String.Format($"{"ChatService",-20} >>> {"GetAllMessagesByGroupId",-20} >>> {"Start",-10} >>> {"GroupId",-10}{groupId}"));
            IEnumerable <ChatMessageDTO> result = null;

            if (groupId == null || groupId == Guid.Empty)
            {
                return(result);
            }

            result = await _chatRepository.GetAllMessagesByGroupId(groupId);

            _logger.Debug($"{"ChatService:",-20} >>> {"GetAllMessagesByGroupId",-20} >>> {"Result:",-10} {JsonConvert.SerializeObject(result)}, {"GroupId:",-10}{groupId}.");

            return(result);
        }