public async Task <EmailMessage> GetMessageByIdAsync(EmailMessageId id) { var message = this.Collection.Find(x => x.Id.Equals(id.ToString())); return((await message.SingleOrDefaultAsync())?.AsEntity()); }
public EmptyMessageBodyException(EmailMessageId messageId) : base($"Message {messageId?.ToString() ?? "error"}: Body cannot be empty!") { }