Host object Property List
Host Object Method list
Tableinfo Table Object Properties
Columninfo Field Information Object
Common methods of Codecommon tool class
Case template with dynamic soft code generator
<#@ template language= "C #" hostspecific= "True" #>
<#@ output extension= ". cs" #>
<#
Tablehost host = (Tablehost) (host);
Host. Fieldlist.sort (Codecommon.comparebyintorder);
Columninfo Identitykey=host. Identitykey;
#>
Database name: <#= host. DbName #>
Database type: <#= host. DbType #>
Table name: <#= host. TableName #>
Table Description: <#= host. Tabledescription #>
Database access class name: <#= host. Dbhelpername #>
Project name: <#= host. ProjectName #>
Stored procedure prefix: <#= host. Procprefix #>
Class naming rules: <#= host. Tabnamerule #>
Database DbType class Name: <#= host. Dbparadbtype #>
Stored procedure parameter symbols: <#= host.preparameter #>
Table collection:
<# foreach (Tableinfo tab in host.) Tablelist)
{
WriteLine (tab. TabName);
} #>
Field collection:
<# foreach (Columninfo C in host. FieldList)
{
WriteLine ("public {0} {1} {{get; Set }} ", Codecommon.dbtypetocs (C.typename), c.columnname);
} #>
Collection of primary key Fields collection:
<# foreach (Columninfo C in host. Keys)
{
WriteLine ("public {0} {1} {{get; Set }} ", Codecommon.dbtypetocs (C.typename), c.columnname);
} #>
Foreign key field collection:
<# foreach (Columninfo C in host. Fkeys)
{
WriteLine ("public {0} {1} {{get; Set }} ", Codecommon.dbtypetocs (C.typename), c.columnname);
} #>
Model class Name: <#= host. Getmodelclass (host. TableName) #>
BLL class Name: <#= host. Getbllclass (host. TableName) #>
Dal class Name: <#= host. Getdalclass (host. TableName) #>
<#= Codecommon.dbparadbtype (host. DbType) #>
<#= Codecommon.preparameter (host. DbType) #>
<#= Codecommon.getwhereparameterexpression (host. Keys,true,host. DbType) #>
<#= Codecommon.getpreparameter (host. Keys,true,host. DbType) #>
<#= Codecommon.getinparameter (host. Keys,true) #>
<#= Codecommon.getfieldstrlist (host. Keys,true) #>
<#= Codecommon.getwhereexpression (host. Keys,true) #>
Using the dynamic soft code generator to create a parameter table for a custom template