Mercurial > pub > bltoolkit
view Tools/Templates.VB/DataModel.tt @ 0:f990fcb411a9
Копия текущей версии из github
author | cin |
---|---|
date | Thu, 27 Mar 2014 21:46:09 +0400 |
parents | |
children |
line wrap: on
line source
<#@ template language="C#" debug="True" hostspecific="True" #> <#@ output extension=".generated.vb" #> <#@ include file="$(SolutionDir)\Source\Templates\BLToolkit.ttinclude" #> <#@ include file="$(SolutionDir)\Source\Templates\BLT4Toolkit.ttinclude" #> <#@ include file="$(SolutionDir)\Source\Templates\MSSQL.ttinclude" #> <#@ include file="$(SolutionDir)\Source\Templates\WCFAttributes.ttinclude" #> <#@ include file="$(SolutionDir)\Source\Templates\VB.ttinclude" #> <# //ConnectionString = "Data Source=DBHost;Port=5000;Database=BLToolkitData;Uid=sa"; //DataProviderAssembly = @"E:\Projects\SVN\BLToolkit\trunk\Redist\Sybase\Sybase.AdoNet2.AseClient.dll"; //ConnectionString = "Server=.;Database=BLToolkitData;Integrated Security=SSPI"; ConnectionString = "Server=.;Database=Northwind;Integrated Security=SSPI"; //Namespace = "Templates"; //DataContextName = "Test"; BaseEntityClass = "EntityBase"; RenderField = true; LoadMetadata(); //Tables["BinaryData"].Columns["BinaryDataID"].MemberName = "ID"; Tables["Employees"].ForeignKeys["FK_Employees_Employees"].MemberName = "ReportsToEmployee"; foreach (var t in Tables.Values) foreach (var c in t.Columns.Values) if (c.IsPrimaryKey && t.TableName + "ID" == c.ColumnName) c.MemberName = "ID"; foreach (var t in Tables.Values) t.BaseClassName = "EntityBase(Of " + t.ClassName + ")"; Usings.Add("BLToolkit.Common"); GenerateModel(); #>