我正在使用Asp.net MVC和实体框架(下面的代码只是为了演示) public class Person [Key]
public+插入新人员时,我手动设置CreatedOn datetime属性。我的问题是如何指示实体框架不要更新属性。假设在上述情况下,如果对于CreatedOn属性,我对实体框架说不要更新它,我不会得到错误。我在</
); UserTable.text= newText;}
我在catch中得到了异常:"The property 'text' is part of the object's key information and cannot be modified."当我查看表格时,我没有在"key“或"index”下面看到任何东西。所以这不是一