How can we improve Microsoft Azure Functions?

Enable dependency injection in C# Functions

It would be useful to have a form of DI in our C# Functions, so we can consistently inject things like our logger class, or other Autofac DI services, into every C# Function we create.

I'd like to create a SDK package which developers can import into their Function and get access to some common functionality via DI, to remove boilerplate redundancy.

Any solution for this kind of thing?

323 votes
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)

We’ll send you updates on this idea

Kirk Marple shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

We’re happy to announce support for Dependency Injection for C#!

See the following content for reference:

Documentation: https://docs.microsoft.com/en-us/azure/azure-functions/functions-dotnet-dependency-injection

Blog announcement: https://azure.microsoft.com/en-us/blog/advancing-the-developer-experience-for-serverless-apps-with-azure-functions/

Thanks,
Oded

10 comments

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base