The current implementation uses reflection in EndpointRegistry.cs to call the ASP.NET Core Minimal API.
While I believe this approach works well in most cases, using source generators is safer and offers better performance because the behavior is determined at compile time, and it is compatible with .NET’s native AOT builds.
Therefore, I'm considering migrating to a source generator-based approach.
The current implementation uses reflection in
EndpointRegistry.csto call the ASP.NET Core Minimal API.While I believe this approach works well in most cases, using source generators is safer and offers better performance because the behavior is determined at compile time, and it is compatible with .NET’s native AOT builds.
Therefore, I'm considering migrating to a source generator-based approach.