How can I load referenced modules within one of my Ninject's module. For an example, I have Business layer module, which depends on DataAccess module, but current I have to do something like this:
Business.Module {
class Module{
public void Load()
{
//add bindings
}
}
}
DataAccess.Module {
class Module{
public void Load()
{
//add repositories bindings
}
}
}
and then within the app., I have to use the both:
class ControllerFactory
{
NinjectKernel kernel = new NinjectKernel(
new Business.Module(),
new DataAccess.Module())
}
but my goal is to separate app and data layer, so app. must refer only business layer, which refer data layer.
I know how it could be done using Unity container. But what about Ninject?