What is IoC Container or DI Container

Shailendra Chauhan  Print   2 min read  
14 Apr 2013
26 Apr 2019

The terms Dependency Injection (DI) & Inversion of Control (IoC) are generally used interchangeably to describe the same design pattern. Hence some people say IoC Container and some people says DI container but both terms indicate to the same thing. So don't be confused by the terminology.

For more help about DI and IoC see Understanding Inversion of Control, Dependency Injection and Service Locator and Dependency Injection in ASP.NET MVC using Unity IoC Container.

What is DI Container

A DI Container is a framework to create dependencies and inject them automatically when required. It automatically creates objects based on the request and injects them when required. DI Container helps us to manage dependencies within the application in a simple and easy way.

We can also manage application dependencies without a DI Container, but it will be like as POOR MAN’S DI and we have to do more work, to make it configured and manageable.

List of popular DI Container for .Net

Today, there are a lot of excellent DI Containers that are available for .NET. Here, I am sharing the list of most useful DI Container for .Net framework.

Castle Windsor

  1. Based on the Castle MicroKernel.

  2. Well documented and used by many.

  3. Understands Decorator

  4. Typed factories

  5. Commercial support available


  1. It has been around since June 2004

  2. It is actively developed and works in many cases



  2. Comprehensive documentation

  3. Commercial support available


  1. Easy to learn API

  2. second-generation DI Container

  3. Commercial support available



  2. Good documentation

  3. Consistent API


  1. Easy to learn API

  2. Second-generation DI Container

Read More Articles Related to Dependency Injection
What do you think?

I hope you will use one of the IoC containers within your .NET application. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome.

Share Article

Take our free skill tests to evaluate your skill!

In less than 5 minutes, with our skill test, you can identify your knowledge gaps and strengths.

Training Schedules
+91 9999123502
Accept cookies & close this