Method AddAsync
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
AddAsync(IPersistenceSession, Contact, CancellationToken)
Stages a contact the book does not yet hold.
Task AddAsync(IPersistenceSession session, Contact contact, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe session the write joins.
contactContactThe contact to add.
cancellationTokenCancellationTokenCancels the staging.
Returns
- Task
A task that completes once the insert is staged; nothing is committed here.
Exceptions
- ArgumentNullException
Thrown when a required argument is null.
- ArgumentException
Thrown when the session cannot supply this store's persistence context.