【发布时间】:2015-09-21 01:41:43
【问题描述】:
我正在尝试使用 EF6 代码优先和 SQL Server Compact 创建数据库。执行update-database 命令后,我得到以下结果:
有奇怪的列Operator_Id、Station_Id、Operator_Id1和Station_Id1。
这是我的模型:
public class OperatorActivity
{
public Guid Id { get; set; }
public DateTime StartDate { get; set; }
public DateTime? EndDate { get; set; }
public bool Synched { get; set; }
public virtual Station Station { get; set; }
public Guid StationId { get; set; }
public virtual Operator Operator { get; set; }
public Guid OperatorId { get; set; }
}
在 SQL Server 中一切正常
为什么我会在 SQL Server Compact 中获取这些列?
【问题讨论】:
标签: sql entity-framework sql-server-ce