From 44fc7dfae4beb570da80ac62d1e3bc9138cfa72d Mon Sep 17 00:00:00 2001 From: Bradley Grainger Date: Wed, 18 Dec 2024 20:04:15 -0800 Subject: [PATCH] Fix link to Keyed Services documentation. --- docs/content/diagnostics/metrics.md | 2 +- src/MySqlConnector.DependencyInjection/docs/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/diagnostics/metrics.md b/docs/content/diagnostics/metrics.md index b916991ed..f62f7f569 100644 --- a/docs/content/diagnostics/metrics.md +++ b/docs/content/diagnostics/metrics.md @@ -73,7 +73,7 @@ builder.Services.AddMySqlDataSource(builder.Configuration.GetConnectionString("D ### Keyed Services -Use the `AddKeyedMySqlDataSource` method to register a `MySqlDataSource` as a [keyed service](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8#keyed-di-services). +Use the `AddKeyedMySqlDataSource` method to register a `MySqlDataSource` as a [keyed service](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8/runtime#keyed-di-services). If the service key is a string, it will automatically be used as the `MySqlDataSource` name. ```csharp diff --git a/src/MySqlConnector.DependencyInjection/docs/README.md b/src/MySqlConnector.DependencyInjection/docs/README.md index a19a3f96b..ea0e5ed2c 100644 --- a/src/MySqlConnector.DependencyInjection/docs/README.md +++ b/src/MySqlConnector.DependencyInjection/docs/README.md @@ -51,7 +51,7 @@ builder.Services.AddMySqlDataSource("Server=server;User ID=test;Password=test;Da ## Keyed Services -Use the `AddKeyedMySqlDataSource` method to register a `MySqlDataSource` as a [keyed service](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8#keyed-di-services). +Use the `AddKeyedMySqlDataSource` method to register a `MySqlDataSource` as a [keyed service](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-8/runtime#keyed-di-services). This is useful if you have multiple connection strings or need to connect to multiple databases. If the service key is a string, it will automatically be used as the `MySqlDataSource` name; to customize this, call the `AddKeyedMySqlDataSource(object?, string, Action)` overload and call `MySqlDataSourceBuilder.UseName`.