I’m trying to rewrite this code from DI autofac to Ninject 3.0.0.15.
I have problem with methods: AsImplementedInterfaces(…) and AsClosedTypesOf(…)
builder.RegisterAssemblyTypes(typeof(CategoryRepository).Assembly)
.Where(t => t.Name.EndsWith("Repository")).AsImplementedInterfaces()
.InstancePerHttpRequest();
Assembly services = Assembly.Load("EFMVC.Domain");
builder.RegisterAssemblyTypes(services)
.AsClosedTypesOf(typeof(ICommandHandler<>)).InstancePerHttpRequest();
builder.RegisterAssemblyTypes(services);
The code is part of very nice demo web app for demonstrating ASP.NET MVC 4 and EF 4.3 Code First, Windows Azure and architectural practices: EFMVC
Thank you for your answers!
Use Ninject.Extensions.Conventions V3.0.0
I think this is what you are looking for: