我不确定为什么,但是在尝试获取“产品”时
return context.Products.SingleOrDefault(m => m.Id == id);
我收到一个Sql异常,上面写着“无效的列名'DefendantId1'。'
不确定名称后面为什么有1,也不确定为什么我未设置属性后出现此错误
我的Property对象中有
public class Product
{
// other props here
[NotMapped]
public int DefendantId { get; set; }
}