我没有意识到,将一个字段命名为"Model“可能会在保存它时产生问题。它显示“用户输入的数据”值无效。
有什么解决方案可以解决这个问题吗?我不想更改列的名称,因为我必须在许多地方修复代码和引用。
DataModel的定义类似于:
public class Price
{
[Key]
public int RowId { get; set; }
public Decimal LatestPrice { get; set; }
public string Model { get; set; }
public string URL { get; set; }
} 发布于 2011-10-28 00:20:39
您可以添加Column attribute以保持相同的表架构,然后更改您的属性名称。键入完新名称后,单击出现在单词末尾的图标,然后选择apply rename refactoring更新所有引用。
https://stackoverflow.com/questions/7919067
复制相似问题