Blazor allows both client and server to be programmed almost entirely in C#. The System.Devices.Gpio namespace provides just about everything one would need to do IO on the ComfilePi. Blazor also includes support for real-time web applications that can be viewed and interacted with from multiple local or remote clients.
The following video demonstrates a project running on the ComfilePi, controlling a CP-IO22-A4-2 IO board (mounted on the rear of the ComfilePi). The application, running on the ComfilePi to the right can be viewed and interacted with from the ComfilePi itself, a development PC, or even a smartphone, in real-time.
Download the source Code for the application demonstrated in the video above.
See also the .NET IoT Libraries API Reference.