diff --git a/csharp/Dockerfile b/csharp/Dockerfile index 00fb87f0bfc..7454d75be2b 100644 --- a/csharp/Dockerfile +++ b/csharp/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 as build +FROM mcr.microsoft.com/dotnet/sdk:9.0 as build WORKDIR /usr/src/app @@ -10,7 +10,7 @@ RUN dotnet restore COPY . . RUN dotnet publish -c release -o out -FROM mcr.microsoft.com/dotnet/aspnet:8.0 +FROM mcr.microsoft.com/dotnet/aspnet:9.0 WORKDIR /usr/src/app diff --git a/csharp/aspnet-minimal-api/config.yaml b/csharp/aspnet-minimal-api/config.yaml index b14e1f77dc0..abdd854267f 100644 --- a/csharp/aspnet-minimal-api/config.yaml +++ b/csharp/aspnet-minimal-api/config.yaml @@ -1,3 +1,3 @@ framework: website: docs.microsoft.com/en-us/aspnet/index - version: 8.0 + version: 9.0 diff --git a/csharp/aspnet-minimal-api/web.csproj b/csharp/aspnet-minimal-api/web.csproj index 1450fca8628..31234f66c4c 100644 --- a/csharp/aspnet-minimal-api/web.csproj +++ b/csharp/aspnet-minimal-api/web.csproj @@ -1,6 +1,6 @@  - net8.0 + net9.0 enable diff --git a/csharp/aspnet-mvc/web.csproj b/csharp/aspnet-mvc/web.csproj index 9f7e8e5f8ad..0164e953ab4 100644 --- a/csharp/aspnet-mvc/web.csproj +++ b/csharp/aspnet-mvc/web.csproj @@ -1,6 +1,6 @@ - net8.0 + net9.0 enable enable diff --git a/csharp/carter/HomeModule.cs b/csharp/carter/HomeModule.cs index 1d5df3a0bc0..4c5063203bc 100644 --- a/csharp/carter/HomeModule.cs +++ b/csharp/carter/HomeModule.cs @@ -1,13 +1,15 @@ namespace web { - using Carter; using System.Threading.Tasks; + using Carter; + using Microsoft.AspNetCore.Builder; + using Microsoft.AspNetCore.Routing; public class HomeModule : CarterModule { - public HomeModule() + public override void AddRoutes(IEndpointRouteBuilder app) { - Get("/", (req, res) => Task.CompletedTask); + app.MapGet("/", () => Task.CompletedTask); } } } diff --git a/csharp/carter/UserModule.cs b/csharp/carter/UserModule.cs index 9e411759344..3b28b519fff 100644 --- a/csharp/carter/UserModule.cs +++ b/csharp/carter/UserModule.cs @@ -1,21 +1,21 @@ namespace web { - using Carter; - using Carter.Request; - using Microsoft.AspNetCore.Http; using System.Threading.Tasks; + using Carter; + using Microsoft.AspNetCore.Builder; + using Microsoft.AspNetCore.Mvc; + using Microsoft.AspNetCore.Routing; public class UserModule : CarterModule { - public UserModule() + public override void AddRoutes(IEndpointRouteBuilder app) { - Get("/user/{id}", async(req, res) => + app.MapGet("/user/{id}", async ([FromRoute] string id) => { - var id = req.RouteValues.As("id"); - await res.WriteAsync(id); + return id; }); - Post("/user", (req, res) => Task.CompletedTask); + app.MapPost("/user", () => Task.CompletedTask); } } } diff --git a/csharp/carter/config.yaml b/csharp/carter/config.yaml index ebfe5522067..f838c1ab958 100644 --- a/csharp/carter/config.yaml +++ b/csharp/carter/config.yaml @@ -1,3 +1,3 @@ framework: github: CarterCommunity/Carter - version: 5.2 + version: 9.0 diff --git a/csharp/carter/web.csproj b/csharp/carter/web.csproj index ecf00a97044..ca543bf490a 100644 --- a/csharp/carter/web.csproj +++ b/csharp/carter/web.csproj @@ -1,11 +1,11 @@  - net8.0 + net9.0 web Exe - + diff --git a/csharp/codebehind/config.yaml b/csharp/codebehind/config.yaml index 3476c8b7a77..3c66fa6ce53 100644 --- a/csharp/codebehind/config.yaml +++ b/csharp/codebehind/config.yaml @@ -1,3 +1,3 @@ framework: website: elanat.net - version: 3.6 + version: 3.9.2 diff --git a/csharp/codebehind/web.csproj b/csharp/codebehind/web.csproj index da1044beb38..9a293da923d 100644 --- a/csharp/codebehind/web.csproj +++ b/csharp/codebehind/web.csproj @@ -1,13 +1,13 @@ - + - net8.0 + net9.0 enable enable - + diff --git a/csharp/fastendpoints/Program.cs b/csharp/fastendpoints/Program.cs index edb9946cc73..c3eaac61c30 100644 --- a/csharp/fastendpoints/Program.cs +++ b/csharp/fastendpoints/Program.cs @@ -8,7 +8,7 @@ app.UseFastEndpoints(); app.Run(); -public class Home : Endpoint +public class Home : EndpointWithoutRequest { public override void Configure() { @@ -16,14 +16,14 @@ public override void Configure() AllowAnonymous(); } - public override Task HandleAsync(object _, CancellationToken __) + public override Task HandleAsync(CancellationToken __) { HttpContext.Response.StatusCode = StatusCodes.Status200OK; return HttpContext.Response.WriteAsync(""); } } -public class UserById : Endpoint +public class UserById : EndpointWithoutRequest { public override void Configure() { @@ -31,7 +31,7 @@ public override void Configure() AllowAnonymous(); } - public override Task HandleAsync(object _, CancellationToken __) + public override Task HandleAsync(CancellationToken __) { HttpContext.Response.StatusCode = StatusCodes.Status200OK; return HttpContext.Response.WriteAsync( @@ -39,16 +39,16 @@ public override Task HandleAsync(object _, CancellationToken __) } } -public class User : Endpoint +public class User : EndpointWithoutRequest { public override void Configure() { Post("/user"); AllowAnonymous(); - Describe(x => x.Accepts("*/*")); + Description(x => x.Accepts("*/*")); } - public override Task HandleAsync(object _, CancellationToken __) + public override Task HandleAsync(CancellationToken __) { HttpContext.Response.StatusCode = StatusCodes.Status200OK; return HttpContext.Response.WriteAsync(""); diff --git a/csharp/fastendpoints/config.yaml b/csharp/fastendpoints/config.yaml index 89bc2768d88..f9e08b6f011 100644 --- a/csharp/fastendpoints/config.yaml +++ b/csharp/fastendpoints/config.yaml @@ -1,3 +1,3 @@ framework: website: fast-endpoints.com - version: 3.1 + version: 5.33.0 diff --git a/csharp/fastendpoints/web.csproj b/csharp/fastendpoints/web.csproj index 6c744bf7ef0..83e07b2215d 100644 --- a/csharp/fastendpoints/web.csproj +++ b/csharp/fastendpoints/web.csproj @@ -1,12 +1,12 @@  - net8.0 + net9.0 enable - + diff --git a/csharp/genhttp/config.yaml b/csharp/genhttp/config.yaml index a25af43a77d..59d5e413cbf 100644 --- a/csharp/genhttp/config.yaml +++ b/csharp/genhttp/config.yaml @@ -1,3 +1,3 @@ framework: github: Kaliumhexacyanoferrat/GenHTTP - version: 9.1 + version: 9.4 diff --git a/csharp/genhttp/web.csproj b/csharp/genhttp/web.csproj index e9d728d5bb8..81800282bcb 100644 --- a/csharp/genhttp/web.csproj +++ b/csharp/genhttp/web.csproj @@ -2,7 +2,7 @@ - net8.0 + net9.0 enable web Exe @@ -13,8 +13,8 @@ - - + + diff --git a/csharp/simplify.web/config.yaml b/csharp/simplify.web/config.yaml index 3a34dc12fce..fb07b8f5e87 100644 --- a/csharp/simplify.web/config.yaml +++ b/csharp/simplify.web/config.yaml @@ -1,3 +1,3 @@ framework: website: web.simplifynet.dev - version: 5.0 + version: 5.1 diff --git a/csharp/simplify.web/web.csproj b/csharp/simplify.web/web.csproj index 5846730d200..36286eef845 100644 --- a/csharp/simplify.web/web.csproj +++ b/csharp/simplify.web/web.csproj @@ -1,9 +1,9 @@  - net8.0 + net9.0 enable - + \ No newline at end of file