I am migrating a project that used Ninject to another one that uses ASP.NET Core DI and I'm getting trouble when trying to inject this piece of code in Ninject:
Bind<PlayerService.PlayerServiceClient>()
.ToConstant(new PlayerService.PlayerServiceClient(new Channel(Configuration.GetValue<string>("playerServiceEndpoint"), ChannelCredentials.Insecure)
.Intercept(new PrometheusClientInterceptor())));
How could I translate this?
Thanks you!
Okay I could make it work as follows:
services.AddSingleton(new PlayerService.PlayerServiceClient(new Channel(Configuration.GetValue<string>("playerServiceEndpoint"), ChannelCredentials.Insecure)));