示例#1
0
        /// <inheritdoc />
        public async Task PurgeDocumentAsync <TDocument>(string id, DocumentTypeMapping <TDocument> mapping)
        {
            if (id == null)
            {
                throw new ArgumentNullException(nameof(id));
            }

            var query     = _queryClient.CreateQueryById(id, 1, mapping);
            var documents = await ExecuteQueryAsync(query);

            var document = documents.FirstOrDefault();

            if (document != null)
            {
                await PurgeDocument(document, mapping);
            }
        }