Who creates an instance of controller?

After a while, I was successfully able to wire up Castle Windstor DI (IOC) to my WebApi project.

Now, I am trying to understand how it works.

For the above reason,

  1. Who creates an instance of a WebAPI controller?
  2. How to put breakpoint for debugging how Windstor Castle actually works?

Just want to say that I am using VS2012 and WebAPI 2 if that helps. :)

Upvotes: 0

Views: 105

Answers (2)

The microsoft poster here explains this very clearly.

Upvotes: 0

Numan
Numan

Reputation: 3948

Here are the direct answers to your questions...

  1. MVC engine is responsible for instantiating a controller (Check links in question comments)
  2. You need source for Castle windsor: Read DI in .NET by Mark Seemann

Upvotes: 2

Related Questions