在codefirst实体框架代码优先 - 无效的列名鉴别
public partial class BaseEntity
{
public int ID { get; set; }
}
public partial class Fund : BaseEntity
{
public int Name { get; set; }
}
public partial class InvestorFund : BaseEntity
{
public int FundID { get; set; }
}
映射类两类
this.Property(t => t.ID).HasColumnName("FundID");
我的代码第一次加入SQL查询
from fund in context.Funds
join investorFund in context.InvestorFunds on fund.ID equals investorFund.FundID
抛出一个Invalid column name Discriminator
每种类型的表(TPT) – karthi 2013-05-16 07:02:15
您应该能够使用我在TPT下编写的代码行来避免此错误。 – DamienG 2013-05-16 22:03:39
在这个例子中,“类型”应该是“鉴别者”。 – 2013-11-21 18:05:42