# Leveraging the Dependency Injection support in Azure Functions

For many developers, techniques such as [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection) and [inversion of control](https://en.wikipedia.org/wiki/Inversion_of_control) have become commonplace in their codebases. Particularly in the .NET space, there are tons of open source frameworks and libraries that make incorporating these practices much easier.

As the software industry continues to steadily adopt more serverless technologies, development teams continue to search for ways to leverage their existing investments into this new serverless world. They want to be able to create modular components and dynamically swap out their implementations without having to rewrite or deploy their code. They want to be able to write focused unit tests for their code and create mock implementations that abstract away external dependencies. 

These are just some of the reasons why support for dependency injection was added to serverless functions targeting .NET Core in [Azure Functions](https://azure.microsoft.com/en-us/services/functions?WT.mc_id=ondotnet-hashnode-cephilli) v2.

We were so excited about this feature, we decided to invite [Fabio Cavalcante](https://twitter.com/codesapien) from the Azure Functions team to come on the [On .NET](https://channel9.msdn.com/Shows/On-NET?WT.mc_id=ondotnet-hashnode-cephilli) show to give us a demo of how it all works.


%[https://www.youtube.com/watch?v=LTPbaNzJd18&time_continue=45]


If you liked this video and would like to see some more of our .NET content, please subscribe to our [.NET Developers YouTube Channel](https://www.youtube.com/channel/UCvtT19MZW8dq5Wwfu6B0oxw).


## Useful Links
* [Use dependency injection in .NET Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection?WT.mc_id=ondotnet-hashnode-cephilli)
* [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-hashnode-cephilli)
* [Create your first function using Visual Studio Code](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-first-function-vs-code?WT.mc_id=ondotnet-hashnode-cephilli)
* [Get started with .NET](https://dotnet.microsoft.com/)
