Skip to content

Commit db0a077

Browse files
committed
Add sample for WebApplication.CreateSlimBuilder
1 parent 7eedd8c commit db0a077

File tree

6 files changed

+39
-5
lines changed

6 files changed

+39
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Samples for ASP.NET Core 6.0 (473)
1+
# Samples for ASP.NET Core 6.0 (474)
22

3-
Samples for ASP.NET Core **8.0 Preview 4** is available [here](/projects/.net8) (11).
3+
Samples for ASP.NET Core **8.0 Preview 4** is available [here](/projects/.net8) (12).
44

55
Samples for ASP.NET Core **7.0** is available [here](/projects/.net7) (45).
66

projects/.net8/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ASP.NET 8.0 Preview 4 (11)
1+
# ASP.NET 8.0 Preview 4 (12)
22

33
These samples require [.NET 8.0 Preview 4](https://github.com/dotnet/installer#table).
44

@@ -45,4 +45,8 @@ These samples require [.NET 8.0 Preview 4](https://github.com/dotnet/installer#t
4545

4646
* [Short Circuit](map-short-circuit)
4747

48-
Use `MapShortCircuit` or `.ShortCircuit()` to efficiently respond to a request without going through a middleware pipeline run.
48+
Use `MapShortCircuit` or `.ShortCircuit()` to efficiently respond to a request without going through a middleware pipeline run.
49+
50+
* [SlimBuilder](slim-builder)
51+
52+
`WebApplication.CreateSlimBuilder` creates `WebApplicationBuilder` with minimal configuration defaults.

projects/.net8/build.bat

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ dotnet build RazorComponentSix
66
dotnet build RazorComponentThree
77
dotnet build RazorComponentTwo
88
dotnet build request-timeout
9-
dotnet build map-short-circuit
9+
dotnet build request-timeout-2
10+
dotnet build request-timeout-3
11+
dotnet build map-short-circuit
12+
dotnet build slim-builder
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var builder = WebApplication.CreateSlimBuilder();
2+
var app = builder.Build();
3+
4+
app.MapGet("/", () => {
5+
return Results.Content("""
6+
<html>
7+
<body>
8+
hello world with WebApplication.CreateSlimBuilder()
9+
</body>
10+
</html>
11+
""", "text/html");
12+
});
13+
14+
app.Run();

projects/.net8/slim-builder/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# WebApplication.CreateSlimBuilder
2+
3+
`WebApplication.CreateSlimBuilder` creates `WebApplicationBuilder` with minimal configuration defaults.
4+
5+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<ImplicitUsings>true</ImplicitUsings>
5+
<LangVersion>preview</LangVersion>
6+
<PreviewFeatures>true</PreviewFeatures>
7+
</PropertyGroup>
8+
</Project>

0 commit comments

Comments
 (0)