动软代码生成器模板设置
作者:互联网
<#@ template language="c#" HostSpecific="True" #> <#@ output extension= ".cs" #> <# TableHost host = (TableHost)(Host); host.Fieldlist.Sort(CodeCommon.CompareByintOrder); #> using System; using System.Text; using System.Collections.Generic; using System.Data; namespace <#= host.NameSpace #>.Model<# if( host.Folder.Length > 0) {#>.<#= host.Folder #><# } #> { <# if( host.TableDescription.Length > 0) {#> //<#= host.TableDescription #> <# } #> public class <#= host.GetModelClass(host.TableName) #> { <# foreach (ColumnInfo c in host.Fieldlist) { #>/// <summary> /// <#= string.IsNullOrEmpty(c.Description) ? c.ColumnName : c.Description #> /// </summary> public <#= CodeCommon.DbTypeToCS(c.TypeName) #><# if(c.Nullable) { #>?<# }#> <#= c.ColumnName #> { get; set; } <# } #> } }
标签:代码生成,set,get,System,动软,using,public,模板 来源: https://www.cnblogs.com/puzi0315/p/10738149.html