powerdesigner 生成C#code 实体 模板设备

格式可以自己定义 注意变量

  language》edit current object language》C#2.0>profile>Attribute>templates>definition

 

模板配置 

.if (%isGenerated%) and (%isValidAttribute%)

    [%oidDocTag%/n]
[%customAttributes%/n]
     /// <summary>
    /// [%Name%]
    /// </summary>

   .if (%Multiple% == false) and (%isIndexer% == false)
[%visibility% ][%flags% ]%dataType% %fieldCode%
{
   get ;
   set;
}

   .else
   private    %dataType%[%arraySize%]  _%fieldCode%[ = %InitialValue%];
[%visibility% ][%flags% ]%dataType%[%arraySize%] %fieldCode%
{
   get ;
   set;
}

   .endif
.endif

 

posted @ 2017-03-13 17:10  文艺流浪汉  阅读(1024)  评论(0编辑  收藏  举报