⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 database_project_db.atcs

📁 .net samples
💻 ATCS
字号:
<#--
	Visual Studio .Net DB project template.
--##>
<#@ Imports
using System;
using System.IO;
using System.Text;
using TwoLKit.nTierBuilder.Api.DbDom;
##>
<#@ InstanceMembers
	private IDatabase Database
	{
		get { return (IDatabase)Environment["Database"]; }
	}

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

	public override string RelativeFilePath
	{
		get { return "Db.vbproj"; }
	}
	
	private string GetNamespace()
	{
		return SharedUtils.GetDbTierNamespace(Database);
	}
	
	/*private bool GenerateWebUI
	{
		get{ return true; }
	}

	private bool GenerateWinUI
	{
		get { return true; }
	}*/
	
	private string GetProjectId(string key)
	{
		string value = (string)Environment.Session[key];
		if(null == value)
		{
			value = Guid.NewGuid().ToString("B").ToUpper();
			Environment.Session[key] = value;
		}
		return value;
	}

	private string GetDbProjectId()
	{
		return GetProjectId("VSDbProjectId");
	}

	private string GetSystemHintPath(string assemblyFile)
	{
		string frameworkDir = Path.GetDirectoryName(typeof(string).Assembly.Location);
		return Path.Combine(frameworkDir, assemblyFile);
	}

	/*private string GetWebUIProjectId()
	{
		return GetProjectId("VSWebUIProjectId");
	}
	
	private string GetWinUIProjectId()
	{
		return GetProjectId("VSWinUIProjectId");
	}*/
##>
<VisualStudioProject>
    <VisualBasic
        ProjectType = "Local"
        ProductVersion = "7.0.9466"
        SchemaVersion = "1.0"
        ProjectGuid = "<#= GetDbProjectId() #>"
    >
        <Build>
            <Settings
				ApplicationIcon = ""
				AssemblyKeyContainerName = ""
				AssemblyName = "<#= GetNamespace() #>"
				AssemblyOriginatorKeyFile = ""
				AssemblyOriginatorKeyMode = "None"
				DefaultClientScript = "JScript"
				DefaultHTMLPageLayout = "Grid"
				DefaultTargetSchema = "IE50"
				DelaySign = "false"
				OutputType = "Library"
				RootNamespace = "<#= GetNamespace() #>"
				OptionCompare = "Binary"
				OptionExplicit = "On"
				OptionStrict = "Off"
				StartupObject = ""
			>
                <Config
                    Name = "Debug"
                    BaseAddress = "285212672"
                    ConfigurationOverrideFile = ""
                    DefineConstants = ""
                    DefineDebug = "true"
                    DefineTrace = "true"
                    DebugSymbols = "true"
                    IncrementalBuild = "true"
                    Optimize = "false"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "1"
                />
                <Config
                    Name = "Release"
                    BaseAddress = "285212672"
                    ConfigurationOverrideFile = ""
                    DefineConstants = ""
                    DefineDebug = "false"
                    DefineTrace = "true"
                    DebugSymbols = "false"
                    IncrementalBuild = "false"
                    Optimize = "true"
                    OutputPath = "bin\"
                    RegisterForComInterop = "false"
                    RemoveIntegerChecks = "false"
                    TreatWarningsAsErrors = "false"
                    WarningLevel = "1"
                />
            </Settings>
            <References>
                <Reference
                    Name = "System"
                    AssemblyName = "System"
                />
                <Reference
                    Name = "System.Data"
                    AssemblyName = "System.Data"
                />
            </References>
			<Imports>
				<Import Namespace = "Microsoft.VisualBasic" />
				<Import Namespace = "System" />
				<Import Namespace = "System.Data" />
				<Import Namespace = "System.Collections" />
			</Imports>
        </Build>
        <Files>
            <Include>
                <File
                    RelPath = "AssemblyInfo.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "<#= Database.CodeName #>_Base.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "<#= Database.CodeName #>.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
<#
	foreach(ITable table in Database.Tables)
	{ ##>
                <File
                    RelPath = "<#= table.CodeName #>Row_Base.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "<#= table.CodeName #>Row.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "<#= table.CodeName #>Collection_Base.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
                <File
                    RelPath = "<#= table.CodeName #>Collection.vb"
                    SubType = "Code"
                    BuildAction = "Compile"
                />
<#	} ##>                
            </Include>
        </Files>
    </VisualBasic>
</VisualStudioProject>

⌨️ 快捷键说明

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