Exemplo n.º 1
0
        public async Task <ActionResult <MessageDto[]> > GetMessagesByChannelId(
            int channelId,
            [Required] DateTime newerThan)

        => (await _unitOfWork.MessageRepository
            .GetMessagesByChannelIdAndNewerThan(channelId, newerThan))
        .Select(message => MessageMapper.MapToDto(message))
        .ToArray();
Exemplo n.º 2
0
 public async Task <ActionResult <MessageDto[]> > GetMessagesNewerThanAsync(DateTime newerThan)
 => (await _unitOfWork.MessageRepository
     .GetMessagesNewerThan(newerThan))
 .Select(message => MessageMapper.MapToDto(message))
 .ToArray();