Hi,i use sdk2.7 and couchbase6.5.1,now i’m creating a new class project that will be use .netstanrd and i want to use sdk 3.1 ,but looks like ClusterHelper, is removed,so what’s the best practices to make a static collection help?
For most modern applications, the recommendation is to use the dependency injection infrastructure. It keeps a singleton of the cluster for you.
If you aren’t using a DI system based upon Microsoft.Extensions.DependencyInjection.Abstractions, you’ll need to handle the singleton using whatever infrastructure you have in your app.
1 Like