Вот код program.cs .NET 9 Aspire AppHost:
Код: Выделить всё
var builder = DistributedApplication.CreateBuilder(args);
var cosmos = builder.AddAzureCosmosDB("cosmos");
var apiService = builder.AddProject
("apiservice")
.WithReference(cosmos)
.WaitFor(cosmos);
builder.AddProject("webfrontend")
.WithExternalHttpEndpoints()
.WithReference(apiService)
.WaitFor(apiService);
builder.Build().Run();
Подробнее здесь: https://stackoverflow.com/questions/793 ... pends-to-r
Мобильная версия