Just urging folks to not just try to shoehorn Wolverine in as a drop in replacement for MediatR:
Wolverine Idioms for MediatR Users https://jeremydmiller.com/2026/01/26/wolverine-idioms-for-mediatr-users/
Just urging folks to not just try to shoehorn Wolverine in as a drop in replacement for MediatR:
Wolverine Idioms for MediatR Users https://jeremydmiller.com/2026/01/26/wolverine-idioms-for-mediatr-users/
@jeremydmiller From this post, how is Cart resolved in AddToCartRequestEndpoint? Is it coming from the IoC and expected to resolve?
I would guess there's something else that pulls user information to get "their cart” that isn't shown here.
Update: reading the docs is helpful :) https://wolverinefx.net/guide/handlers/persistence.html#automatically-loading-entities-to-method-parameters
@jeremydmiller Is there a way to resolve the Id from something like a session Id or a claim on the principal?
In this case, carts are sometimes tied to the individual, and they can have only a single active cart at a time. So, passing the ID to the endpoint is not necessary in this case.
@khalidabuhakmeh See any usage of "LoadAsync()" in this:
@khalidabuhakmeh And Wolverine is trying really hard in most cases to *not* use IoC at runtime. That's a significant difference from other tools.
Admittedly trips up some users of course