1
我一直在尝试构建一个应用程序并遇到小问题的EF5。实体框架5代码首先不映射模型
我创建了像
public class TargetBusinessModel
{
public int Id { get; set; }
public Guid BusinessId {get; set; }
public Business Business { get; set; }
public string ContactName { get; set; }
public string ContactTitle { get; set; }
public string ContactPhone { get; set; }
}
更新的内容档案
public DbSet<TargetBusinessModel> TargetBusinessModels { get; set; }
我的问题是没有从业务属性都在数据库中映射模型。
我试图添加的商业模式来自另一个项目,我不确定是否这是原因。
我不介意代码是先为我的商业模型创建一个单独的表还是将它们组合在一起。
任何人都可以帮忙吗?
由于懒惰,这是答案:) –