Closed ghost closed 6 years ago
I've had a similar need and ended up creating [Inject] binding that would automatically inject IConfiguration instance that you can use to read all application settings, including connection strings. Working example:
Hi,
I have updated the library to Azure Functions V2. It is now possible to access the configuration when configuring the IoC container. See the readme for an example.
Hi Boris,
Thanks for the code and useful blog post.
When I register some services, I need to be able to use a connection string from a configuration object. I found a good article by Jon Gallant that describes the new way to build an IConfigurationRoot object. However, that approach relies on a ExecutionContext object, which I don't is available in InjectConfiguration.
Do you have any ideas how a can do this?