首页 > 数据库技术 > 详细

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

时间:2021-06-11 00:51:40      阅读:18      评论:0      收藏:0      [点我收藏+]

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

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

原文:https://www.cnblogs.com/mirck/p/14872383.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!