动软代码生成器生成model

model

<#@ template language="c#" HostSpecific="True" #>
<#@ output extension= ".cs" #>
<#
    TableHost host = (TableHost)(Host);
    host.Fieldlist.Sort(CodeCommon.CompareByintOrder);
#>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Chloe.Entity;
namespace <#= host.NameSpace #><# 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) #> <#= c.ColumnName #> { get; set; }        
        <# } #>
    }
}

 

posted @ 2019-09-27 15:24  萌橙  阅读(894)  评论(0编辑  收藏  举报