0
Hello! I’m using the DDD type architecture to do a project, in it I have the Crosscutting layer, and in this layer I thought of adding a class library project with Ninject so that it does not stay in the presentation part.
I’ve made some attempts but I haven’t found anything to solve the problem... you could help me?
That’s as close as I got:
public class CrossCuttingModule : NinjectModule
{
public override void Load()
{
Bind(typeof(IAppService<>)).To(typeof(AppService<>));
Bind<IClienteService>().To<ClienteService>();
Bind<IProdutoService>().To<ProdutoService>();
Bind(typeof(IRepository<>)).To(typeof(Repository<>));
Bind<IProdutoRepository>().To<ProdutoRepository>();
Bind<IClienteRepository>().To<ClienteRepository>();
}
}
Yes, but in this case it is in the MVC project right? I would like in a separate project...
– Kevin