Mercurial > pub > bltoolkit
view Tools/Templates.VB/DataModel.tt @ 5:f7d63a092920
Исправлено условие Where в тех случаях, когда репозитарий не является генериком
author | cin |
---|---|
date | Tue, 10 Mar 2015 16:02:11 +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(); #>