我写的Model
public class DEPARTMENT
{
public int ID { get; set; }
public string NAME { get; set; }
public string TYPE { get; set; }
public string DESCRIPTION { get; set; }
public int CLASS { get; set; }
public int SUBCLS { get; set; }
public int EMP_COUNT { get; set; }
public int DEPTCLOSE { get; set; }
public int DISPORDER { get; set; }
public string SITE { get; set; }
public int Account_Id { get; set; }
}
public class MyOAContext: DbContext
{
public MyOAContext() : base("MyOa")
{
}
public DbSet<DEPARTMENT> DP { get; set; }
}

是不是这里的model接收不了查询到的数据
你用的是codefirst还是dbfirst,前者你定义的model有问题,而且数据库应该让它自己生成。后者你不需要定义model,model应该让ef去生成。