For all of you tired of creating cumbersome ASP.Net providers and struggling with App.config, a lightweight yet powerful dependency injection for .Net: Ninject. This is an example how the injection works with properties:

 

class Samurai {
  private IWeapon _weapon;

[Inject] public IWeapon Weapon { get { return _weapon; } set { _weapon = value; } }

public void Attack(string target) { _weapon.Hit(target); } }

Hope you will enjoy it!