Structuremap Basics


Define the instance for your interface

[sourcecode language="csharp"]
public class WiringModule
{
public void Initialize(IInitializationExpression x)
{
x.For<IJobPoster>().Use<JobPoster>();
}
}

[/sourcecode]

Call the wiring module within Application_Start() event in Global.asax.cs

[sourcecode language="csharp"]
protected void Application_Start()
{
ObjectFactory.Initialize(wiringModule.Initalize);
}

[/sourcecode]

To be continued