Here is my problem. My application has several projects.
- WEB (controllers and views)
- Services
- Data (edmx and repositories)
- Entities (POCO)
- Test
So in my web project I have a ninject configuration
[assembly: WebActivator.PreApplicationStartMethod(typeof(PublicPanama.AppStart_NinjectMVC3), "Start")]
namespace Web{
public static class AppStart_NinjectMVC3 {
public static void RegisterServices(IKernel kernel) {
kernel.Bind<IContributorService>().To<ContributorService>();
}
public static void Start() {
IKernel kernel = new StandardKernel();
RegisterServices(kernel);
DependencyResolver.SetResolver(new NinjectServiceLocator(kernel));
}
}
}
The problem is that I also want to add
kernel.Bind<IRepository>().To<Repository>();
But my web project does not have a link to the Data project .. and just adding a link for this does not seem right.
What am I missing? please, help!
source
share