How do you implement dependency injection in ASP.NET MVC (pre-Core)?

Updated Apr 28, 2026

Short answer

Use third-party containers like Unity, Ninject, or Autofac.

Deep explanation

ASP.NET MVC does not have built-in DI like Core, so external containers are used to inject dependencies into controllers.

Unlock with a Pro subscription to view this section.

View pricing

Real-world example

No real-world example available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Common mistakes

No common mistakes listed yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

Follow-up questions

No follow-up questions available yet.

Unlock with a Pro subscription to view this section.

Upgrade to Pro

More ASP.NET MVC interview questions

View all →