Closed joaoantunes closed 4 years ago
@joaoantunes I would accept a pull request for adding a new Nuget that supports the Azure FunctionsBuilder.
Regardless of a pull request, you should be able to pretty well copy/paste the little bit of code for IHostBuilder
support in the AspNetCore adapter
No recent activity
Azure Functions V2 now supports .net dependency injection In order to achieve that you need to do the following code:
I want to change the default container to use Lamar
O the documentation there is an example for a WebHost:
But I'm not able to change IFunctionsHostBuilder to use "UseLamar()" extension. Since this extends IWebHostBuilder. The only ways I was able to intercept the initialization of azure functions was Either with FunctionsStartup that configures IFunctionsHostBuilder or IWebJobsStartup that configures IWebJobsBuilder, but I don't find extensions for those kinds of builds on Lamar.
I've tried to check the existing extension to create a similar code but is not working because probably I need to create more stuff: