我正在尝试为模型中的属性设置默认值
public string fruitType = "Apple";
public string FruitType
{
get { return fruitType; }
set { fruitType = value; }
}
但是,我遇到的问题FruitType不是我的数据库表中的列,因此它会引发错误。即使该列不存在,我是否可以设置它?
我正在尝试为模型中的属性设置默认值
public string fruitType = "Apple";
public string FruitType
{
get { return fruitType; }
set { fruitType = value; }
}
但是,我遇到的问题FruitType不是我的数据库表中的列,因此它会引发错误。即使该列不存在,我是否可以设置它?