Castle Windsor ASP.NET MVC 3 Baby Example part 2
March 26, 2011
So I created an IStoryTeller interface, with one method that returns a string. GoodMorning.
Very sophisticated, no?
Next, I created 2 classes that implement the IStoryTeller interface. A French and a Dutch. I'm pretty sure you know where this is going:
Now I have to create an installer for the StoryTeller. Here is where I tell Castle Windsor which StoryTeller to implement:
Now I can create the controller and add the IStoryTeller to the constructor:
So this is how easy this is.