Skip to content

Commit

Permalink
Fix xrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Nov 13, 2024
1 parent f88c53e commit 9592122
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/database/includes/sql-app-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ms.topic: include
---

The SQL Server hosting integration models a SQL Server as the <xref:Aspire.Hosting.ApplicationModel.SqlServerResource> type. To access this type and APIs that allow you to add it to your [📦 Aspire.Hosting.SqlServer](https://www.nuget.org/packages/Aspire.Hosting.SqlServer) NuGet package in the [app host](xref:dotnet/aspire/app-host) project.
The SQL Server hosting integration models a SQL Server as the <xref:Aspire.Hosting.ApplicationModel.SqlServerServerResource> type and the database as the <xref:Aspire.Hosting.ApplicationModel.SqlServerDatabaseResource> type. To access these types and APIs that allow you to add it to your [📦 Aspire.Hosting.SqlServer](https://www.nuget.org/packages/Aspire.Hosting.SqlServer) NuGet package in the [app host](xref:dotnet/aspire/app-host) project.

### [.NET CLI](#tab/dotnet-cli)

Expand Down
14 changes: 7 additions & 7 deletions docs/database/sql-server-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dotnet add package Aspire.Microsoft.Data.SqlClient

### Add SQL Server client

In the _:::no-loc text="Program.cs":::_ file of your client-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireSqlServerExtensions.AddSqlServerClient%2A> extension method on any <xref:Microsoft.Extensions.Hosting.IHostApplicationBuilder> to register a `SqlConnection` for use via the dependency injection container. The method takes a connection name parameter.
In the _:::no-loc text="Program.cs":::_ file of your client-consuming project, call the <xref:Microsoft.Extensions.Hosting.AspireSqlServerSqlClientExtensions.AddSqlServerClient*> extension method on any <xref:Microsoft.Extensions.Hosting.IHostApplicationBuilder> to register a `SqlConnection` for use via the dependency injection container. The method takes a connection name parameter.

```csharp
builder.AddSqlServerClient(connectionName: "sql");
Expand All @@ -64,7 +64,7 @@ For more information on dependency injection, see [.NET dependency injection](/d

### Add keyed SQL Server client

There might be situations where you want to register multiple `SqlConnection` instances with different connection names. To register keyed SQL Server clients, call the <xref:Microsoft.Extensions.Hosting.AspireSqlServerExtensions.AddKeyedSqlServerClient*> method:
There might be situations where you want to register multiple `SqlConnection` instances with different connection names. To register keyed SQL Server clients, call the <xref:Microsoft.Extensions.Hosting.AspireSqlServerSqlClientExtensions.AddKeyedSqlServerClient*> method:

```csharp
builder.AddKeyedSqlServerClient(name: "mainDb");
Expand All @@ -90,7 +90,7 @@ The .NET Aspire SQL Server integration provides multiple options to configure th

#### Use a connection string

When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling the <xref:Microsoft.Extensions.Hosting.AspireSqlServerExtensions.AddSqlServerClient*> method:
When using a connection string from the `ConnectionStrings` configuration section, you can provide the name of the connection string when calling the <xref:Microsoft.Extensions.Hosting.AspireSqlServerSqlClientExtensions.AddSqlServerClient*> method:

```csharp
builder.AddSqlServerClient(connectionName: "sql");
Expand All @@ -110,7 +110,7 @@ For more information on how to format this connection string, see the [Connectio

#### Use configuration providers

The .NET Aspire SQL Server integration supports <xref:Microsoft.Extensions.Configuration>. It loads the <xref:Aspire.Microsoft.Data.SqlClient.SqlClientSettings> from configuration by using the `Aspire:Microsoft:Data:SqlClient` key. The following snippet is an example of a _:::no-loc text="appsettings.json":::_ file that configures some of the options:
The .NET Aspire SQL Server integration supports <xref:Microsoft.Extensions.Configuration>. It loads the <xref:Aspire.Microsoft.Data.SqlClient.MicrosoftDataSqlClientSettings> from configuration by using the `Aspire:Microsoft:Data:SqlClient` key. The following snippet is an example of a _:::no-loc text="appsettings.json":::_ file that configures some of the options:

```json
{
Expand All @@ -132,7 +132,7 @@ For the complete SQL Server client integration JSON schema, see [Aspire.Microsof

#### Use inline delegates

Also you can pass the `Action<SqlClientSettings> configureSettings` delegate to set up some or all the options inline, for example to disable health checks from code:
Also you can pass the `Action<MicrosoftDataSqlClientSettings> configureSettings` delegate to set up some or all the options inline, for example to disable health checks from code:

```csharp
builder.AddSqlServerClient(
Expand All @@ -146,14 +146,14 @@ By default, .NET Aspire integrations enable [health checks](../fundamentals/heal

The .NET Aspire SQL Server integration:

- Adds the health check when <xref:Aspire.Microsoft.Data.SqlClient.SqlClientSettings.DisableHealthChecks?displayProperty=nameWithType> is `false`, which attempts to connect to the SQL Server.
- Adds the health check when <xref:Aspire.Microsoft.Data.SqlClient.MicrosoftDataSqlClientSettings.DisableHealthChecks?displayProperty=nameWithType> is `false`, which attempts to connect to the SQL Server.
- Integrates with the `/health` HTTP endpoint, which specifies all registered health checks must pass for app to be considered ready to accept traffic.

[!INCLUDE [integration-observability-and-telemetry](../includes/integration-observability-and-telemetry.md)]

#### Logging

The .NET Aspire SQL Server integration currently doesn't enable logging by default due to limitations of the `SqlClient`.
The .NET Aspire SQL Server integration currently doesn't enable logging by default due to limitations of the <xref:Microsoft.Data.SqlClient>.

#### Tracing

Expand Down

0 comments on commit 9592122

Please sign in to comment.