3 ms·
Isn’t there still lots of boilerplate, it’s just generated for you?
by nonethewiser 4y ago
Isn’t there still lots of boilerplate, it’s just generated for you?
- brushfoot 4y agoThe boilerplate is pretty minimal nowadays. In 2020, C# introduced top-level statements, which removed a lot of the ceremony. You used to have a class, and there would typically be a separate Startup.cs file. Today, this is a complete .cs file for creating an API: var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.MapGet("/", () => "Hello World!"); app.Run();
- older 4y ago"Hello world" is a one-liner Since .Net 6.
- nirav72 4y agoNope. Take a look at Minimal API in .net 6 and onwards.