I'm using Ninject
DI container. And I've got the two
public interface IRepository<T> where T : AbstractEntity<T>, IAggregateRoot
{
// methods signatures
}
public class Repository<T> : IRepository<T> where T : AbstractEntity<T>, IAggregateRoot
{
// implementations
}
Then I'm trying to bind them in a separate module
public class DataAccessModule : Ninject.Modules.NinjectModule
{
public override void Load()
{
this.Bind<IRepository<>>().To<Repository<>>();
}
}
where this.Bind<IRepository<>>().To<Repository<>>();
is not recognized as a statement.
How do I make a bind?