public IEnumerable <Message> GetAllMessages() { var allMessages = _messageReader.GetAllMessagesFromDb(); if (allMessages == null) { throw new Exception("The reader has returned NULL"); } else { return(allMessages); } }