An online tool to quickly and effortlessly test and compare the behaviour of .NET's query string binding across both minimal APIs and controller-based APIs1.
Input queries are sent to a set of in-memory test server (TestServer) instances — a component which fuels .NET's integration testing capabilities2 — one which wraps an API built with minimal APIs, and another which wraps an API built with Controllers.
Using source generators3, these test servers define a number of endpoints which utilise the FromQuery attribute to bind (or, attempt to bind) the incoming query string parameter q
to a given target type.
A distinct (in-memory) request is sent to each test server for all target types, and these binding results are collated by the caller and returned to the client. To summarize:
flowchart LR
client["Client<br>[Blazor WASM]"]
subgraph "Server [Azure Function App]"
func["Evaluator<br>[Azure Function]"]
func -->|forward query| tsA[["[TestServer] (Minimal APIs)"]]
func -->|forward query| tsB[["[TestServer] (Controllers)"]]
end
client -->|send query| func