Entity framework 4 DbContext的子类不返回任何数据

Entity framework 4 DbContext的子类不返回任何数据,entity-framework-4,dbcontext,Entity Framework 4,Dbcontext,下面是我的DbContext的子类: public class JalsoxDbContextCache : JalsoxDbContext, IJalsoxDbContext { } 你知道为什么我使用基类时它不会返回任何数据吗?类的名称用于创建连接字符串 因此,我将派生类更改为: public class JalsoxDbContextCache : JalsoxDbContext, IJalsoxDbContext { public JalsoxDbContextCache()

下面是我的DbContext的子类:

public class JalsoxDbContextCache : JalsoxDbContext, IJalsoxDbContext
{

}

你知道为什么我使用基类时它不会返回任何数据吗?

类的名称用于创建连接字符串

因此,我将派生类更改为:

public class JalsoxDbContextCache : JalsoxDbContext, IJalsoxDbContext
{
    public JalsoxDbContextCache()
        : base("JalsoxDbContext")
    {
    }
}
真奇怪