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
Examples
services.AddCouchbaseBucket<IMyBucket>("my-bucket", builder => {
builder.AddDefaultCollection<IMyDefaultCollection>();
builder.AddScope("my-scope")
.AddCollection<IMyCollection>("my-collection");
});
Properties
| Improve this Doc 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
| Improve this Doc View SourceGetCollectionAsync()
Returns the collection.
Declaration
ValueTask<ICouchbaseCollection> GetCollectionAsync()
Returns
Type | Description |
---|---|
ValueTask<ICouchbaseCollection> | The ICouchbaseCollection. |