You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.NET 8.0 is adding support for keyed services; we should add AddMySqlDataSource overloads which accept a key. This is ideal for registering multiple data sources in the same DI container, and later selecting which one you want via e.g. [FromKeyedServices].
@bgrainger you can check out the Npgsql implementation by @NinoFloris; we ended up just adding an optional parameter to do it, rather than add method overloads with the "Keyed" prefix (you can see the discussion there if interested).
Thanks. Not sure yet if I follow (or agree with) the rationale for avoiding Keyed in the method names, but I'll do some more reading on it. (My initial reaction is that AddKeyedMySqlDataSource would be better for clarify and disambiguating overloads.)
.NET 8.0 is adding support for keyed services; we should add
AddMySqlDataSource
overloads which accept a key. This is ideal for registering multiple data sources in the same DI container, and later selecting which one you want via e.g.[FromKeyedServices]
.See related Npgsql issue: npgsql/npgsql#5134.
The text was updated successfully, but these errors were encountered: