Making a Forgotten Case Break the Build with C# 15 Unions in ASP.NET Core
A small fee calculator example that uses a closed union to describe every possible outcome of an ASP.NET Core endpoint, so that code which forgets to map a result to an HTTP status code fails to compile.