table_collection_user.atcs

来自「.net samples」· ATCS 代码 · 共 79 行

ATCS
79
字号
<#--
	User Table template.
--##>
<#@ Imports
using System;
using TwoLKit.nTierBuilder.Api.DbDom;
##>
<#@ InstanceMembers
	private ITable Table
	{
		get { return (ITable)Environment["Table"]; }
	}

	public override bool RewriteExistingFile
	{
		get { return false; }
	}

	public override string RelativeFilePath
	{
		get { return GetClassName() + ".vb"; }
	}
	
	private string GetClassName()
	{
		return GetTableClassName(Table);
	}
	
	private string GetTableClassName(ITable table)
	{
		return table.CodeName + "Collection";
	}
	
	private string GetTableView()
	{
		return Table.View ? "view" : "table";
	}
	
	private string GetDbClassName()
	{
		return Table.Database.CodeName;
	}
	
	private string GetNamespace()
	{
		return SharedUtils.GetDbTierNamespace(Table.Database);
	}
##>
' <fileinfo name="<#= RelativeFilePath #>">
'		<copyright owner="<#= Environment["CopyrightOwner"] #>">
'			All Rights Reserved.
'		</copyright>
'		<remarks>
'			You can update this source code manually. If the file
'			already exist it will not be rewrited by the generator.
'		</remarks>
'		<generator rewritefile="<#= RewriteExistingFile #>" infourl="http://www.2LKit.com">2LKit nTier Builder</generator>
'		<created><#= DateTime.Now.ToString("f") #></created>
' </fileinfo>

Option Strict Off
Option Explicit On

Imports System

'' <summary>
'' Represents the '<#= Table.CodeName #>' <#= GetTableView() #>.
'' </summary>
Public Class <#= GetClassName() #>
		Inherits <#= GetClassName() #>_Base
	'' <summary>
	'' Initializes a new instance of the <#= GetClassName() #> class.
	'' </summary>
	'' <param name="db">The database object.</param>
	Friend Sub New(db As <#= GetDbClassName() #>)
		MyBase.New(db)
		' EMPTY
	End Sub
End Class

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?