Ejemplo n.º 1
0
 /// <summary>
 /// Ensures that the collection exists as an asynchronous operation.
 /// </summary>
 /// <returns>
 /// A <see cref="Task"/> representing the asynchronous operation to ensure the collection exists.
 /// </returns>
 private async Task EnsureCollectionExistsAsync()
 {
     await _initializer.EnsureCollectionExistsAsync(_options.CollectionName);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the document container as an asynchronous operation.
        /// </summary>
        /// <returns>
        /// A <see cref="Task{TResult}"/> representing the asynchronous operation to get the container.
        /// </returns>
        private async Task <Container> GetContainerAsync()
        {
            await _initializer.EnsureCollectionExistsAsync(_client, _options.CollectionName !);

            return(_client.GetContainer(_options.DatabaseName, _options.CollectionName));
        }