comparison Tools/Templates.VB/DataModel.tt @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 <#@ template language="C#" debug="True" hostspecific="True" #>
2 <#@ output extension=".generated.vb" #>
3 <#@ include file="$(SolutionDir)\Source\Templates\BLToolkit.ttinclude" #>
4 <#@ include file="$(SolutionDir)\Source\Templates\BLT4Toolkit.ttinclude" #>
5 <#@ include file="$(SolutionDir)\Source\Templates\MSSQL.ttinclude" #>
6 <#@ include file="$(SolutionDir)\Source\Templates\WCFAttributes.ttinclude" #>
7 <#@ include file="$(SolutionDir)\Source\Templates\VB.ttinclude" #>
8 <#
9 //ConnectionString = "Data Source=DBHost;Port=5000;Database=BLToolkitData;Uid=sa";
10 //DataProviderAssembly = @"E:\Projects\SVN\BLToolkit\trunk\Redist\Sybase\Sybase.AdoNet2.AseClient.dll";
11
12 //ConnectionString = "Server=.;Database=BLToolkitData;Integrated Security=SSPI";
13 ConnectionString = "Server=.;Database=Northwind;Integrated Security=SSPI";
14
15 //Namespace = "Templates";
16 //DataContextName = "Test";
17
18 BaseEntityClass = "EntityBase";
19
20 RenderField = true;
21
22 LoadMetadata();
23
24 //Tables["BinaryData"].Columns["BinaryDataID"].MemberName = "ID";
25
26 Tables["Employees"].ForeignKeys["FK_Employees_Employees"].MemberName = "ReportsToEmployee";
27
28 foreach (var t in Tables.Values)
29 foreach (var c in t.Columns.Values)
30 if (c.IsPrimaryKey && t.TableName + "ID" == c.ColumnName)
31 c.MemberName = "ID";
32
33 foreach (var t in Tables.Values)
34 t.BaseClassName = "EntityBase(Of " + t.ClassName + ")";
35
36 Usings.Add("BLToolkit.Common");
37
38 GenerateModel();
39 #>