t4模板中自动映射说明和摘要到实体中

 

找到:

var simpleProperties = typeMapper.GetSimpleProperties(entity);

if (simpleProperties.Any())
{
foreach (var edmProperty in simpleProperties)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<#
}
}

替换成:

var simpleProperties = typeMapper.GetSimpleProperties(entity);
if (simpleProperties.Any())
{
foreach (var edmProperty in simpleProperties)
{
#>
<# if (edmProperty.Documentation != null && edmProperty.Documentation.Summary != null)
{
#>
/// <summary><#= edmProperty.Documentation.Summary #></summary>
<#=codeStringGenerator.Property(edmProperty)#>
<# }#>
<# if (edmProperty.Documentation == null)
{
#>
<#=codeStringGenerator.Property(edmProperty)#>
<# }#>
<#
}
}

posted on 2016-06-20 15:49  皓轩大哥  阅读(166)  评论(0编辑  收藏  举报

导航