Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    Interface INamedCollectionProvider

    Base interface for injecting specific Couchbase collections.

    Namespace: Couchbase.Extensions.DependencyInjection
    Assembly: Couchbase.Extensions.DependencyInjection.dll
    Syntax
    public interface INamedCollectionProvider
    Remarks

    Inherit an empty interface from this interface, and then use AddCollection<T>(string) to register the interface in the IServiceCollection.

    Examples
    services.AddCouchbaseBucket<IMyBucket>("my-bucket", builder => {
        builder.AddDefaultCollection<IMyDefaultCollection>();
        builder.AddScope("my-scope")
            .AddCollection<IMyCollection>("my-collection");
    });

    Properties

    | Edit this page View Source

    CollectionName

    Name of the collection.

    Declaration
    string CollectionName { get; }
    Property Value
    Type Description
    string
    | Edit this page View Source

    ScopeName

    Name of the scope.

    Declaration
    string ScopeName { get; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    GetCollectionAsync()

    Returns the collection.

    Declaration
    ValueTask<ICouchbaseCollection> GetCollectionAsync()
    Returns
    Type Description
    ValueTask<ICouchbaseCollection>

    The ICouchbaseCollection.

    • Edit this page
    • View Source
    In this article
    Back to top © 2025 Couchbase, Inc.