However I’m unable to get my code to build because I can not seem to find the right assembly to resolve the GetBucket method.
This is what I have in my controller:
In my startup I have the following:
public void ConfigureServices(IServiceCollection services)
the interface is defined per the blog referenced above:
public interface ICMDBBucketProvider : INamedBucketProvider
// nothing goes here
What am I missing to get this last referenced method resolved?
I’ve made your suggested changes but I’m still not able to get this to work. Now when I try to preform GetBucketAsync() the system just seems to hang. No errors or exceptions are being displayed, nor does it seem to timeout. Please note my instance of couchbase is not running on my local but in a container in Azure.
Thanks a lot:)
This is entirely different from the SDK 2.x. In the 2.x version we used to inject the provider and create the bucket in the Constructor and run the N1QL queries at the bucket level. So we need to now know the clusters on which the query needs to run. Previously we just need to know the bucket on which the query needs to execute. Is my understanding correct?
How do we configure the clusters using Dependency Injection. It is a bit weird, the upsert is at bucket level, the get document is at bucket level. Only the N1Ql queries need to be run at cluster level.
There is a cluster object inside the bucket. I just used that property for my n1ql queries, and preformed key-value and subqueries using the bucket. Depending on your situation you can get better performance using these other types of queries.