Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✅ Merge main into live #1095

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading