动软代码生成器模板设置

原文链接: http://www.cnblogs.com/puzi0315/p/10738149.html
<#@ 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;  }        
        <# } #>
   
    }
}

转载于:https://www.cnblogs.com/puzi0315/p/10738149.html

猜你喜欢

转载自blog.csdn.net/weixin_30548917/article/details/94892239