对插入的对象进行赋值,标识列的属性不能赋值,在实体类中,标识列设置一下属性
如
[Column(IsDbGenerated = true)]
public int FSerialID { get; set; }
这样才能插入