1. 程式人生 > 其它 >PowerDesigner 更加資料庫模型生成 ef 實體

PowerDesigner 更加資料庫模型生成 ef 實體

PowerDesigner 資料庫模型生成 ef 實體模板

Profile\Attribute\Templates\definition


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

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

.endif

Profile\Class\Templates\definition


[%comment%\n]\
[%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 SSharing.Ubtrip.Model.Flight_Intl  //名稱空間
{
   \[Table("%Code%")\]
   %definition%
}
[\n\n%sourceFooter%]
.endif