Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further simplify empty project template #32662

Merged
merged 1 commit into from
May 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Http/samples/MinimalSample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.Hosting;

await using var app = WebApplication.Create(args);
var app = WebApplication.Create(args);

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

await app.RunAsync();
app.Run();
2 changes: 1 addition & 1 deletion src/Http/samples/MinimalSampleFSharp/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ open Microsoft.Extensions.Hosting

[<EntryPoint>]
let main args =
use app = WebApplication.Create(args)
let app = WebApplication.Create(args)

if app.Environment.IsDevelopment() then
app.UseDeveloperExceptionPage() |> ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Microsoft.Extensions.Hosting;

var builder = WebApplication.CreateBuilder(args);
await using var app = builder.Build();
var app = builder.Build();

if (app.Environment.IsDevelopment())
{
Expand All @@ -12,4 +12,4 @@

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

await app.RunAsync();
app.Run();
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ open Microsoft.Extensions.Hosting
[<EntryPoint>]
let main args =
let builder = WebApplication.CreateBuilder(args)
use app = builder.Build()
let app = builder.Build()

if app.Environment.IsDevelopment() then
app.UseDeveloperExceptionPage() |> ignore
Expand Down