The positive connotation is that you write less code with less cognitive overhead.
Generally I prefer ASP.NET over things like Spring and Ruby on Rails because it has less magic, despite being clearly inspired by both of those.
Here’s a concrete ASP.NET example: You can put an [ApiController] attribute on your controllers and it can change the structure of error responses, among other things. [1]
I don’t agree with some of the other parent points. For example, the comments on “multiple dependency injection container” —- ASP.NET is pretty prescriptive on DI patterns. That sounds like someone made a decision to add complexity, which is on them.
So, are Rust macros, or C macros, C++ templating magic or it's just means "I don't want to know how this works therefore it's magic"?
How do you PUT { "foo" : { "bar" : "baz" }} to ping/pong/yolo?
You create a controller class, PingController, you create a method PutPong, then you give up and proceed to cry blood
app.MapPut("ping/pong/yolo", ctx => ...);
and in there you read the Body as string ... it should be a one liner?
You have to: 1. [Optional] Define a DTO that deserializes { "foo" : { "bar" : "baz" }} to an object 2. Write a class that subclasses Controller 3. Write a method, call it whatever you want, that accepts a JObject or one of your DTO types. 4. Add the attribute [HttpPut("ping/pong/yolo")] to tell the framework this method should be bound to PUTs for that path. 5. Write your business logic.
Is that blood-crying inducing? No.
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