Castle Windsor ASP.NET MVC 3 Baby Example part 2
maart 26, 2011
This is part 1. The sourcecode is here.
This article is based on this tutorial.
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:
And now if I change the Installer and inject the FrenchStoryTeller I get:
So this is how easy this is.
[…] I created 2 classes that implement the IStoryTeller interface. A French and a Dutch. …… [full post] Jacqie itslet 0 0 0 0 0 [26 Mar 2011 10:16 […]
[…] GoodMorning. Very sophisticated, no? Next, I created 2 classes that implement the …… [full post] Jacqie codeitsletasp.net mvcc# 0 0 0 0 0 [26 […]