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");
我的Code First连接SQL查询
from fund in context.Funds
join investorFund in context.InvestorFunds on fund.ID equals investorFund.FundID
抛出一个无效的列名Discriminator