1.切换OOM模型
2.选择菜单Language-->Edit Current Object Language
3.修改Profile/Attribute/Templates/definition为下面第一代码即可
.if (%isGenerated%) and (%isValidAttribute%)
[%comment%/n]/
[%oidDocTag%/n]/
[%customAttributes%/n]/
.if (%Multiple% == false) and (%isIndexer% == false)
private %dataType% _%fieldCode%[ = %InitialValue%];
/// <summary>
///%Name%[,%Comment%]/ .//Name与Comment为模型中的属性,可根据实际情况修改
/n/// </summary>
[%visibility%][%flags%] %dataType% %Code%
{
get
{
return _%fieldCode%;
}
set
{
_%fieldCode% = value;
}
}
.else
private %dataType%[%arraySize%] _%fieldCode%[ = %InitialValue%];
/// <summary>
///%Name%[,%Comment%]/
/n/// </summary>
[%visibility%][%flags%] %dataType%[%arraySize%] %Code%
{
get
{
return _%fieldCode%;
}
set
{
_%fieldCode% = value;
}
}
.endif
.endif