Eagerly compile minimal apis
I want to initialize minimal apis on initialization rather than the first request. Is there a way to manually force it to initialize? Other than making a request to one of the endpoints from within the application.
4 Replies
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
A minimal api is a delegate, there's nothing to initialize? The instance is created when you map it.
Unknown User•5mo ago
Message Not Public
Sign In & Join Server To View
So it seems to resolve each endpoint separately. I wanted to check if they could be called. For example, if it will be able to resolve the services injected into the constructor. The way I figured is calling the endpoint manually. Kind of like this:
But again, this doesn't seem to compile the whole graph.