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)#>
<# }#>
<#
}
}