Skip to content

Commit 543eb19

Browse files
authored
Further simplify empty project template (#32662)
1 parent 20f7481 commit 543eb19

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/Http/samples/MinimalSample/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using Microsoft.AspNetCore.Builder;
33
using Microsoft.Extensions.Hosting;
44

5-
await using var app = WebApplication.Create(args);
5+
var app = WebApplication.Create(args);
66

77
if (app.Environment.IsDevelopment())
88
{
@@ -18,4 +18,4 @@
1818
string SayHello(string name) => $"Hello, {name}!";
1919
app.MapGet("/hello/{name}", (Func<string, string>)SayHello);
2020

21-
await app.RunAsync();
21+
app.Run();

src/Http/samples/MinimalSampleFSharp/Program.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ open Microsoft.Extensions.Hosting
44

55
[<EntryPoint>]
66
let main args =
7-
use app = WebApplication.Create(args)
7+
let app = WebApplication.Create(args)
88

99
if app.Environment.IsDevelopment() then
1010
app.UseDeveloperExceptionPage() |> ignore

src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-CSharp/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using Microsoft.Extensions.Hosting;
44

55
var builder = WebApplication.CreateBuilder(args);
6-
await using var app = builder.Build();
6+
var app = builder.Build();
77

88
if (app.Environment.IsDevelopment())
99
{
@@ -12,4 +12,4 @@
1212

1313
app.MapGet("/", (Func<string>)(() => "Hello World!"));
1414

15-
await app.RunAsync();
15+
app.Run();

src/ProjectTemplates/Web.ProjectTemplates/content/EmptyWeb-FSharp/Program.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ open Microsoft.Extensions.Hosting
55
[<EntryPoint>]
66
let main args =
77
let builder = WebApplication.CreateBuilder(args)
8-
use app = builder.Build()
8+
let app = builder.Build()
99

1010
if app.Environment.IsDevelopment() then
1111
app.UseDeveloperExceptionPage() |> ignore

0 commit comments

Comments
 (0)