How to implement dependency injection in azure functions

Azure Functions can implement complex logic, and like any other net core app, Dependency Injection helps us keep our components well-decoupled ensuring testability and maintainability.