webdevbing
webdevbing

Reputation: 332

Inject service to configure SignalR backplane

I am trying to use Azure Redis instance as the backplane for my dotnet core signalr application. I need to pull the configuration settings from a database. How do I inject a service to AddStackExchangeRedis()?

            services
            .AddSignalR()
            .AddStackExchangeRedis(options =>
            {
                var settingsService = provider.GetRequiredService<SettingsService>();
                var redisOptions = settingsService.GetOptions();
                options.Configuration.ChannelPrefix = "MyChannel";
            });

Upvotes: 3

Views: 247

Answers (0)

Related Questions