Last active
August 2, 2022 14:09
-
-
Save Edkorenkov/724d6a5b2962df9b386a29d6914e3cc0 to your computer and use it in GitHub Desktop.
.NET6 minimal startup tamplate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddControllers(); | |
var app = builder.Build(); | |
app | |
.UseRouting() | |
.UseEndpoints(x => x.MapControllers()); | |
app.Run(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var builder = WebApplication.CreateBuilder(args); | |
builder.Services.AddSwaggerGen(); | |
builder.Services.AddControllers(); | |
var app = builder.Build(); | |
app | |
.UseRouting() | |
.UseSwagger() | |
.UseSwaggerUI() | |
.UseEndpoints(x => x.MapControllers()); | |
app.Run(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment