PowerDesigner 更加数据库模型生成 ef 实体


PowerDesigner 数据库模型生成 ef 实体模板

Profile\Attribute\Templates\definition


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

/// 
/// %Comment%
/// 
\[Column("%Name%")\]
[%visibility% ][%flags% ]%dataType% 
.convert_name(%Code%,"_",,FirstUpperChar)
{ get; set; }

.endif


Profile\Class\Templates\definition


[%oidDocTag%\n]\
[%classProperties%\n]\
[%visibility% ][%flags% ][%isPartialType%?partial ]class 
.convert_name(%Code%,"_",,FirstUpperChar)
[%genericTypeParameters%][ : %inheritanceList%][ %genericTypeConstraints%]
{
[\
   %members%\n
]\
[\
   %innerClasses%\n
]\
[\
   %innerInterfaces%\n
]\
}

Profile\Classifier\Templates\sourceBody

.// only toplevel classes are generated
.if (%ContainerClassifier% == null)
.// header and usings
[\
%usings%\n
]\
[\
%Package.comment%
]\
.// class/interface definition appears within a given namespace
namespace aaaaaaaaaaaaaaa  //名称空间
{
   /// 
   /// %Comment%
   /// 
   \[Table("%Name%")\]
   %definition%
}
[\n\n%sourceFooter%]
.endif