Tag: asp-net-core (3)
-
-
Custom Model Binders in ASP.NET Core 6
2022-02-13
This past week I was integrating with a third party service that passes back boolean values in the query string as Yes/No. The built-in ASP.NET Core 6 model binding can handle true/false or 1/0, but not Yes/No. Let's look at how to make our own custom model binder for this simple use case and how to unit test it. Continue Reading -
Redirects in ASP.NET Core With Both HTML and JSON Endpoints
2021-08-27
This past week I ran into the problem of retrofitting an endpoint that returns JSON into an app that up until now has returned HTML from all endpoints. Luckily, ASP.NET Core makes it easy to customize the behavior. Continue Reading