PowerDesigner 更加数据库模型生成 ef 实体
PowerDesigner 数据库模型生成 ef 实体模板
在OOM Generation Options 界面中的,detail标签中,将Convert name into code,前面打沟除掉
Profile\Attribute\Templates\definition
.if (%isGenerated%) and (%isValidAttribute%)
/// <summary>
/// %Comment%
/// </summary>
\[Column("%Code%")\]
[%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 //名称空间
{
/// <summary>
/// %Comment%
/// </summary>
\[Table("%Code%")\]
%definition%
}
[\n\n%sourceFooter%]
.endif