string summary=string.Empty; foreach (var entity in typeMapper.GetItemsToGenerate<EntityType>(itemCollection)) { fileManager.StartNewFile(entity.Name + ".cs"); BeginNamespace(code); if(entity.Documentation !=null && entity.Documentation.Summary!=null) summary=entity.Documentation.Summary; else summary=entity.Name; #> <#=codeStringGenerator.UsingDirectives(inHeader: false)#> /// <summary> /// <#=summary#> /// </summary> <#=codeStringGenerator.EntityClassOpening(entity)#>
foreach (var edmProperty in simpleProperties) { if (edmProperty.Documentation != null && edmProperty.Documentation.Summary != null) { summary=edmProperty.Documentation.Summary; } else { summary=""; } #> /// <summary> /// <#=summary#> /// </summary> <#=codeStringGenerator.Property(edmProperty)#>
<# foreach (var navigationProperty innavigationProperties) { if(navigationProperty.Documentation != null &&navigationProperty.Documentation.Summary != null) { summary=navigationProperty.Documentation.Summary; } else { summary=""; } #> /// <summary> /// <#=summary#> /// </summary> <#=codeStringGenerator.NavigationProperty(navigationProperty)#> <#
原文地址:http://blog.csdn.net/hao134838/article/details/46481987