#@ 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 #>
{
<# if( host.TableDescription.Length > 0) {#>
//<#= host.TableDescription #>
<# } #>
public class <#= ClassName #>
{
public void HelloPot()
{
Console.WriteLine("Hello, Maticsoft");
<# foreach (ColumnInfo c in host.Fieldlist)
{ #>///
/// <#= string.IsNullOrEmpty(c.Description) ? c.ColumnName : c.Description #>
///
public <#= CodeCommon.DbTypeToCS(c.TypeName) #> <#= c.ColumnName #> { get; set; }
<# } #>
//方式二
<# foreach (ColumnInfo c in host.Fieldlist)
{
WriteLine("///");
WriteLine("///{0}",c.ColumnName);
WriteLine("///");
WriteLine("public {0} {1} {{ get; set; }}",CodeCommon.DbTypeToCS(c.TypeName),c.ColumnName );
} #>
}
}
}
<#+
string ClassName ="MyClass";
#>