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 SourceCollectionName
Name of the collection.
Declaration
string CollectionName { get; }
Property Value
Type | Description |
---|---|
string |
ScopeName
Name of the scope.
Declaration
string ScopeName { get; }
Property Value
Type | Description |
---|---|
string |
Methods
| Edit this page View SourceGetCollectionAsync()
Returns the collection.
Declaration
ValueTask<ICouchbaseCollection> GetCollectionAsync()
Returns
Type | Description |
---|---|
ValueTask<ICouchbaseCollection> | The ICouchbaseCollection. |