So, I tried an empty ASP.Net project and what I found looks extremely familiar. All the boilerplate code is gone and I can setup regular http methods like I am used to :
var builder = WebApplication.CreateBuilder(args); var app = builder.Build(); app.MapGet("/", () => "Hello World!"); app.MapPost("/thing", async context => { Thing thing = await context.Request.ReadFromJsonAsync<Thing>(); await context.Response.WriteAsJsonAsync(thing); }); app.Run(); public class Thing { public string name { get; set; } = ""; }
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So, I tried an empty ASP.Net project and what I found looks extremely familiar. All the boilerplate code is gone and I can setup regular http methods like I am used to :