youtube image
From YouTube: Leveraging the Dependency Injection support in Azure Functions

Description

Using dependency injection in Azure Functions
https://docs.microsoft.com/azure/azure-functions/functions-dotnet-dependency-injection?WT.mc_id=ondotnet-c9-cxa

Code demos from the show
https://github.com/fabiocav/azfunc-di-demo

Advancing the developer experience for serverless apps with Azure Functions
https://azure.microsoft.com/en-us/blog/advancing-the-developer-experience-for-serverless-apps-with-azure-functions?WT.mc_id=ondotnet-c9-cxa

.NET developers have been taking advantage of dependency injection (DI) to make their code easier to test and manage. The latest update to Azure Functions v2 now has support for registering services with DI.

In this episode, Fabio Cavalcante from the Azure Functions team joins us to showcase how this feature works.

[00:58] - Why is dependency injection so important for Azure Functions ?
[02:00] - What had to happen on the engineering side to enable this feature?
[03:10] - How to register services using the DI capabilities?
[06:22] - How do our functions consume these services?
[09:52] - What scenarios does this feature simplify?
[10:31] - How can we use HttpClientFactory in Functions?
[15:20] - How can we customize ILogger?
[19:00] - What other services are registered by default?
[20:32] - Is there support for scoped services?

#azurefunctions #dotnet #dotnetdeveloper