3 ms·
I'm not sure which learning material you used back then but this seems more like an unfortunate accident. With .NET 6 SDK, 'dotnet new webapi' will give you a
by neonsunset 4y ago
I'm not sure which learning material you used back then but this seems more like an unfortunate accident.
With .NET 6 SDK, 'dotnet new webapi' will give you a template project that does everything you listed save for extended validation logic which you can easily add with 'FluentValidation'.
In addition, to run ASP.NET Core nowadays you only need:
var builder = WebApplication.CreateBuilder();
var app = builder.Build();
app.MapGet("/posts/{name}", ([FromRoute] string name) => /* controller logic, classes will be serialized as JSON */);
await app.RunAsync("http://localhost:8080");