Skip to content

Commit

Permalink
Merge pull request #1095 from dotnet/main
Browse files Browse the repository at this point in the history
✅ Merge `main` into `live`
  • Loading branch information
github-actions[bot] authored Jun 14, 2024
2 parents 509c6a9 + 3b33c1b commit 0a12381
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/azureai/azureai-search-document-component.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: .NET Aspire Azure AI Search Documents component
description: Learn how to use the .NET Aspire Azure AI Search Documents component.
ms.topic: how-to
ms.date: 06/05/2024
ms.date: 06/12/2024
---

# .NET Aspire Azure AI Search Documents component
Expand Down Expand Up @@ -37,10 +37,10 @@ For more information, see [dotnet add package](/dotnet/core/tools/dotnet-add-pac

## Example usage

In the _:::no-loc text="Program.cs":::_ file of your component-consuming project, call the extension method to register an `SearchIndexClient` for use via the dependency injection container. The method takes a connection name parameter.
In the _:::no-loc text="Program.cs":::_ file of your component-consuming project, call the extension method to register an `SearchIndexClient` for use via the dependency injection container. The <xref:Microsoft.Extensions.Hosting.AspireAzureSearchExtensions.AddAzureSearchClient%2A> method takes a connection name parameter.

```csharp
builder.AddAzureSearch("searchConnectionName");
builder.AddAzureSearchClient("searchConnectionName");
```

You can then retrieve the `SearchIndexClient` instance using dependency injection. For example, to retrieve the client from an example service:
Expand Down Expand Up @@ -105,7 +105,7 @@ var myService = builder.AddProject<Projects.MyService>()
.WithReference(search);
```

The `AddAzureSearch` method will read connection information from the AppHost's configuration (for example, from "user secrets") under the `ConnectionStrings:search` config key. The `WithReference` method passes that connection information into a connection string named `search` in the `MyService` project. In the _:::no-loc text="Program.cs":::_ file of `MyService`, the connection can be consumed using:
The <xref:Aspire.Hosting.AzureSearchExtensions.AddAzureSearch%2A> method will read connection information from the AppHost's configuration (for example, from "user secrets") under the `ConnectionStrings:search` config key. The `WithReference` method passes that connection information into a connection string named `search` in the `MyService` project. In the _:::no-loc text="Program.cs":::_ file of `MyService`, the connection can be consumed using:

```csharp
builder.AddAzureSearch("search");
Expand Down
4 changes: 2 additions & 2 deletions docs/fundamentals/health-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ In the appropriate consuming app's entry point (usually the _:::no-loc text="Pro
// Wherever your services are being registered.
// Before the call to Build().
builder.Services.AddRequestTimeouts();
builder.Services.AddOutputCaching();
builder.Services.AddOutputCache();

var app = builder.Build();

// Wherever your app has been built, before the call to Run().
app.UseRequestTimeouts();
app.UseOutputCaching();
app.UseOutputCache();

app.Run();
```
Expand Down

0 comments on commit 0a12381

Please sign in to comment.