Mercurial > pub > bltoolkit
view Tools/Templates.VB/DataModel.tt @ 9:1e85f66cf767 default tip
update bltoolkit
author | nickolay |
---|---|
date | Thu, 05 Apr 2018 20:53:26 +0300 |
parents | f990fcb411a9 |
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(); #>