/// <inheritdoc />
        public async Task CreateDocumentAsync <TDocument>(
            TDocument document,
            DocumentTypeMapping <TDocument> mapping,
            OperationOptions options)
        {
            if (document == null)
            {
                throw new ArgumentNullException(nameof(document));
            }
            if (mapping == null)
            {
                throw new ArgumentNullException(nameof(mapping));
            }

            options = options ?? new OperationOptions();

            var documentId   = mapping.IdMapper(document);
            var modifiedTime = DateTime.UtcNow;

            var dbRecord = CreateDbDocument(document, documentId, mapping, options, modifiedTime, modifiedTime);

            await CreateDocumentAsync(dbRecord);
        }