C#C
C#7mo ago
Queimaduras

Custom Binder Minimal API Error

I have a custom binder with a BindAsync to bind a string to a long after decrypting it.
It works for the Drafts endpoints, but with the Works endpoints I get an error saying that I should implement a TryParse() method, which I can't because I need the HttpContext and only BindAsync can provide me that.
How can the binder work for some endpoints and not for others when those endpoints are implemented the same way?

https://paste.mod.gg/cfwoixhyakos/2
A tool for sharing your source code with the world!
Was this page helpful?