代码
<%--
Name: 数据库实体类
Author: B哥
Description: 数据库实体类
--%>
<%@ CodeTemplate Language="C#" TargetLanguage="C#" ResponseEncoding="UTF-8" Debug="False" Description="生成数据库实体" %>
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="属性" Description="要生成实体的数据表" %>
<%@ Property Name="NameSpace" Type="System.String" Default="WanerSoft.Model" Optional="False" Category="属性" Description="实体类所在的命名空间" %>
<%@ Property Name="opuser" Type="System.String" Default="" Optional="False" Category="属性" Description="请输入您的名字" %>
<%@ Map Name="CSharpAlias" Src="System-CSharpAlias" Description="System to C# Type Map" %>
<%@ Assembly Name="SchemaExplorer" %>
<%@ Import Namespace="SchemaExplorer" %>
/*
*本代码由代码生成器自动生成,请不要更改此文件的任何代码。
*生成时间:<%= DateTime.Now.ToLocalTime() %>
*生成者:<%= opuser %>
*/
using System;
namespace <%= this.NameSpace %>
{
///<summary>
///表<%= this.SourceTable.Name %>的实体类
///</summary>
public class <%= this.SourceTable.Name %>
{
<% foreach (ColumnSchema column in this.SourceTable.Columns) { %>
private <%= CSharpAlias[column.SystemType.FullName] %> _<%= StringUtil.ToCamelCase(column.Name) %>;
/// <summary>
/// <%= column.Description %>
/// </summary>
public <%= CSharpAlias[column.SystemType.FullName] %> <%= StringUtil.ToPascalCase(column.Name) %>
{
get { return _<%= StringUtil.ToCamelCase(column.Name) %>; }
set { _<%= StringUtil.ToCamelCase(column.Name) %> = value; }
}
<% } %>
}
}
Name: 数据库实体类
Author: B哥
Description: 数据库实体类
--%>
<%@ CodeTemplate Language="C#" TargetLanguage="C#" ResponseEncoding="UTF-8" Debug="False" Description="生成数据库实体" %>
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="属性" Description="要生成实体的数据表" %>
<%@ Property Name="NameSpace" Type="System.String" Default="WanerSoft.Model" Optional="False" Category="属性" Description="实体类所在的命名空间" %>
<%@ Property Name="opuser" Type="System.String" Default="" Optional="False" Category="属性" Description="请输入您的名字" %>
<%@ Map Name="CSharpAlias" Src="System-CSharpAlias" Description="System to C# Type Map" %>
<%@ Assembly Name="SchemaExplorer" %>
<%@ Import Namespace="SchemaExplorer" %>
/*
*本代码由代码生成器自动生成,请不要更改此文件的任何代码。
*生成时间:<%= DateTime.Now.ToLocalTime() %>
*生成者:<%= opuser %>
*/
using System;
namespace <%= this.NameSpace %>
{
///<summary>
///表<%= this.SourceTable.Name %>的实体类
///</summary>
public class <%= this.SourceTable.Name %>
{
<% foreach (ColumnSchema column in this.SourceTable.Columns) { %>
private <%= CSharpAlias[column.SystemType.FullName] %> _<%= StringUtil.ToCamelCase(column.Name) %>;
/// <summary>
/// <%= column.Description %>
/// </summary>
public <%= CSharpAlias[column.SystemType.FullName] %> <%= StringUtil.ToPascalCase(column.Name) %>
{
get { return _<%= StringUtil.ToCamelCase(column.Name) %>; }
set { _<%= StringUtil.ToCamelCase(column.Name) %> = value; }
}
<% } %>
}
}