Skip to content

Commit

Permalink
Matched the App host Redis reference to the consuming project (#1148)
Browse files Browse the repository at this point in the history
  • Loading branch information
BaileyHewitt committed Jun 23, 2024
1 parent 31fa7c1 commit 6ed6ce6
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ public class ExampleService(IDistributedCache cache)
```csharp
var builder = DistributedApplication.CreateBuilder(args);

var redis = builder.AddRedis("redis");
var redis = builder.AddRedis("cache");

builder.AddProject<Projects.ExampleProject>()
.WithReference(redis)
```

The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> method configures a connection in the `ExampleProject` project named `redis`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Redis connection can be consumed using:
The <xref:Aspire.Hosting.ResourceBuilderExtensions.WithReference%2A> method configures a connection in the `ExampleProject` project named `cache`. In the _:::no-loc text="Program.cs":::_ file of `ExampleProject`, the Redis connection can be consumed using:

```csharp
builder.AddRedisDistributedCache("cache");
Expand Down

0 comments on commit 6ed6ce6

Please sign in to comment.