I am having trouble injecting AutoMapper into an ASP.NET MVC 2 application using Ninject. I used Jimmy Bogard\'s post on AutoMapper and StructureMap type Configuration as a guid
I got it working but it doesn't feel very clean creating an instance of the Configuration class. Any suggestions to clean it up further.
Bind().To();
Bind().ToConstant(new Configuration(Kernel.Get(), MapperRegistry.AllMappers())).InSingletonScope();
Bind().ToMethod(c => c.Kernel.Get());
Bind().ToMethod(c => c.Kernel.Get());
Bind().To();