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