public static IEnumerable <Message?> Get(Channel channel) { using var messageTable = MessageDAO.GetWithChannelId(channel.Id); var messages = messageTable.AsEnumerable() .Select(x => MessageFactory.Create(x)); return(messages); }