When I got this error I resolved it by creating an EntityTypeConfiguration for the model. It seems that is the only prerequisite to using the repository, you have to create one and then load it in the context.
public class MyTypeConfiguration : EntityTypeConfiguration<Models.MyType>
{
public MyTypeConfiguration()
{
ToTable("MyType");
}
}
then put this in your context..protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
// model binding configurations
modelBuilder.Configurations
.Add(new MyTypeConfiguration())
}