Get the latest version from the source tab at Munq.Codeplex.com. This version has improved views, and this is the version that I am most familiar with, and I wrote it.
To prevent circular references for registration, create a class project that includes reversals to Munq.Interfaces and the interfaces and implementations that you want to register.
, IMunqConfig. void RegisterIn ( IIocContainer). .
public class MyRegistration : IMuncConfig
{
public void RegisterIn(IIocContainer container)
{
container.Register<IMyInterface>(c => new MyImplementation());
container.Register<IMyInterface, MyImplementation>();
}
}
global.asax
protected void Application_Start()
{
IocContainer = new Container();
Munq.COnfigurationLoader.FindAndRegisterDependencies(container);
AreaRegistration.RegisterAllAreas();
RegisterRoutes(RouteTable.Routes);
}
bin DLL, , IMunqConfig, RegisterIn. dll bin :)