Skip to content

Commit

Permalink
Some fixes related to #2024
Browse files Browse the repository at this point in the history
  • Loading branch information
IEvangelist committed Nov 11, 2024
1 parent 0542c51 commit 38b7424
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<Sdk Name="Aspire.AppHost.Sdk" Version="9.0.0" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireHost>true</IsAspireHost>
<UserSecretsId>65600b1c-627d-4255-a706-bf7e21108831</UserSecretsId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Hosting.AppHost" Version="8.2.2" />
<PackageReference Include="Aspire.Hosting.SqlServer" Version="8.2.2" />
<PackageReference Include="Aspire.Hosting.AppHost" Version="9.0.0" />
<PackageReference Include="Aspire.Hosting.SqlServer" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AspireSQLEFCore\AspireSQLEFCore.csproj" />
</ItemGroup>

</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.AddDatabase("sqldata");

builder.AddProject<Projects.AspireSQLEFCore>("aspiresql")
.WithReference(sql);
.WithReference(sql)
.WaitFor(sql);

builder.Build().Run();
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17115;http://localhost:15026",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21115",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22115"
}
},
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:15026",
"environmentVariables": {
"ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true",
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16053",
"DOTNET_ENVIRONMENT": "Development"
}
"environmentVariables": {
"ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true",
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:16053",
"DOTNET_ENVIRONMENT": "Development",
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:22259"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsAspireSharedProject>true</IsAspireSharedProject>
Expand All @@ -10,8 +10,8 @@
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />

<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="8.10.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="8.2.2" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" Version="9.0.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Aspire.Microsoft.EntityFrameworkCore.SqlServer" Version="8.2.2" />
<PackageReference Include="Aspire.Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@
</div>

@code {
[SupplyParameterFromForm]
[SupplyParameterFromForm(FormName = "Tickets")]
private SupportTicket Ticket { get; set; } = new();

private List<SupportTicket> Tickets = [];

private void ClearForm() => Ticket = new();
Expand All @@ -51,7 +52,11 @@
private async Task HandleValidSubmit()
{
context.Tickets.Add(Ticket);

await context.SaveChangesAsync();

Tickets = await context.Tickets.ToListAsync();

ClearForm();
}
}
2 changes: 1 addition & 1 deletion docs/database/sql-server-integrations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Connect an ASP.NET Core app to SQL Server using .NET Aspire and Entity Framework Core
description: Learn how to connect an ASP.NET Core app to to SQL Server using .NET Aspire and Entity Framework Core.
ms.date: 08/12/2024
ms.date: 11/08/2024
ms.topic: tutorial
---

Expand Down
2 changes: 1 addition & 1 deletion docs/storage/azure-storage-integrations.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Connect an ASP.NET Core app to .NET Aspire storage integrations
description: Learn how to connect an ASP.NET Core app to .NET Aspire storage integrations.
ms.date: 08/12/2024
ms.date: 11/08/2024
ms.topic: tutorial
zone_pivot_groups: azure-storage-mechanism
ms.custom: devx-track-extended-azdevcli
Expand Down

0 comments on commit 38b7424

Please sign in to comment.