Simple ASP.NET Web API Project That Implements IoC/DI using Castle Windsor

DI or Dependency Injection is a way to write an interface rather than an implementation – IOW, code to an interface or abstraction rather than a concrete implementation. It allows for extensibility and you are not locked in to a particular class. DI is closely related to Inversion of Control(IoC). Instead of a class instantiating a concrete class, it uses a constructor that takes the interfce type a s an argument, and the concrete  calss implements that interface is passed to it.

To give you a rundown on what code needs to be added to the WebAPI, here we’ll enumerate the basic process.

Read the rest of the post here:

Leave a Reply

Your email address will not be published. Required fields are marked *