Note on Constructor Dependency Injection design pattern. This is how it is in C#.
private IContactManagerRepository _repository;
public ContactController()
: this(new EntityContactManagerRepository())
{ }
public ContactController(IContactManagerRepository repository)
{
_repository = repository;
}
1 comments:
We just developed a open source Light Weight Ioc / Dependency Injection framework.
http://blog.isilverlabs.com/2010/08/lightweight-ioc-dependency-injection-framework/
Post a Comment