十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
<%@ 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;
}
}
<%
}
%>
}