I'm trying to use SignalR with MySQL in .NET Core. I need to pass a dynamic connection string for SignalR.
I see services.AddSignalR().AddSqlServer() for SQL Server but I'm not able to see a similar one for MySql.
Can anyone please help?
Thanks
I'm trying to use SignalR with MySQL in .NET Core. I need to pass a dynamic connection string for SignalR.
I see services.AddSignalR().AddSqlServer() for SQL Server but I'm not able to see a similar one for MySql.
Can anyone please help?
Thanks
I am not sure in which way you are try to pass the dynamic connection string. While I was investigating your issue, I found that there's no overloading for
AddSignalR()in order to pass the Database instance or connection string, at least the way, you are trying which isservices.AddSignalR().AddSqlServer()I am not sure, where have you seen this.There's no such official document I founded.
If you look at the
SignalRDependencyInjectionExtensionsinterface you would seen, there's no method which we could use in order to pass.AddMySql(options =>or even the sql server connection string.Therefore, according to your shared code snippet, or query, we cannot pass the connection string through
AddSignalR().In addition, you could try within your HubClass. And it would be nicer if you could share more details about your hub class.
Note: Please refer to this official document, this might be resourceful for you.