tags:

views:

425

answers:

1

I'm gonna use Ninject 2.0 in a project and looking for a good sample on how to configure it for a class library case. Many samples are available for WebForms and ASP.NET MVC but in my case I want to inject a Repository in my DataAccess project to Services project (both are class libraries) and I don't need to inject anything into my Web project.

Any idea?

+1  A: 

You have to create a class to manage the configuration of you IoC container and use it to create you objects.

Config.GetDataAccess() and inside the Config object you encapsulate all the IoC configuration and object instantiation code

CodeClimber
Any sample code?
Mahdi