重庆分公司,新征程启航
为企业提供网站建设、域名注册、服务器等服务
<%@ CodeTemplate Language="C#" TargetLanguage="Text" ResponseEncoding="UTF-8" Src="" Inherits="" Debug="False" Description="Template description here." %>
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Default="" Optional="True" Category="Tables" Description="This is a Table." %>
<%@ Property Name="ModelClassNameSpace" Type="System.String" Default="modelClassNameSpace" Optional="False" Category="Strings" Description="This is ModelClassNameSpace"%>
<%@ Assembly Name="SchemaExplorer" %>
<%@ Import Namespace="SchemaExplorer" %>
///author:penty
//创建时间<%= DateTime.Now.ToLongDateString()%>
///
public class <%= GetClassName(SourceTable)%>
{
<%
foreach(ColumnSchema column in SourceTable.Columns)
{
%>
<%= GetMemberVariableDeclarationStatement(column)%>
<%
}
%>
public <%= GetClassName(SourceTable)%>()
{
}
public <%= GetClassName(SourceTable)%>(<%= GetConStructorParameters(SourceTable)%>)
{
<%
foreach(ColumnSchema column in SourceTable.Columns)
{
%>
<%= GetMemberVariableName(column)%> = <%= GetMemberVariableName(column).Substring(1) %> ;
<%
}
%>
}
<%
foreach(ColumnSchema column in SourceTable.Columns)
{
%>
public <%= GetCSharpVariableType(column)%> <%= GetPascalMemberVariableName(column)%>
{
get
{
return <%= GetMemberVariableName(column)%>;
}
set
{
<%= GetMemberVariableName(column)%>=value;
}
}
<%
}
%>
}