Skip to content

Commit cbfdeb4

Browse files
committed
Using Minimal API Approach
1 parent edc1d78 commit cbfdeb4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

035_NancyFX_To_Core_Migration/Program.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ public static void Main(string[] args)
1616

1717
var app = builder.Build();
1818

19+
// Using Minimal API Approach
20+
app.MapGet("/", () => "Hello from ASP.NET Core!");
21+
22+
app.MapGet("/greet/{name}", (string name) => $"Hello, {name}!");
23+
1924
// Configure the HTTP request pipeline.
2025
if (app.Environment.IsDevelopment())
2126
{

0 commit comments

Comments
 (0)