1. [EdmScalarPropertyAttribute(EntityKeyProperty=false, IsNullable=true)]
[DataMemberAttribute()]
[DisplayName("编号")]
//[Required(ErrorMessage="编号不能为空")]
public global::System.String center_no
{
get
{
return _center_no;
}
set
{
Oncenter_noChanging(value);
ReportPropertyChanging("center_no");
_center_no = StructuralObject.SetValidValue(value, true);
ReportPropertyChanged("center_no");
Oncenter_noChanged();
}
}
这里的StructuralObject.SetValidValue(value, false)作用是什么?
2 如果数据库表里的字段是允许为空的,是不是不能将StructuralObject.SetValidValue(value, true)改为StructuralObject.SetValidValue(value, false)
望高手指点迷津,先谢过了!