/// <inheritdoc /> public virtual string CreateOne( CreateIndexModel <TDocument> model, CreateOneIndexOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { var createManyIndexOptions = ToCreateManyIndexesOptions(options); var result = CreateMany(new[] { model }, createManyIndexOptions, cancellationToken); return(result.Single()); }
/// <inheritdoc /> public virtual async Task <string> CreateOneAsync( CreateIndexModel <TDocument> model, CreateOneIndexOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { var createManyIndexOptions = ToCreateManyIndexesOptions(options); var result = await CreateManyAsync(new[] { model }, createManyIndexOptions, cancellationToken).ConfigureAwait(false); return(result.Single()); }