5 ms·
app.MapPut("ping/pong/yolo", ([FromBody] Payload request) => {...}); record Payload(Foo Foo); record Foo(string Bar); or app.MapPut("ping/pong/yolo", (JsonE
by neonsunset 4y ago
app.MapPut("ping/pong/yolo", ([FromBody] Payload request) => {...});
record Payload(Foo Foo);
record Foo(string Bar);
or
app.MapPut("ping/pong/yolo", (JsonElement json) => {...});
Basically, just avoid outdated blog posts and articles :D
- cerved 4y agothis looks like asp.net core
- neonsunset 4y agoNo one in their sane mind would use ASP.NET for new projects (it is legacy and a business risk) nowadays so it's reasonable to assume that everyone means ASP.NET Core given the .NET 7 context.
- cerved 4y agothe context was asp.net mvc specifically
- metaltyphoon 4y agoASP.NET MVC is dead. It has been over 6 years; you need to update yourself.