PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 0ms

/PetaPoco/Models/Generated/Database.tt

http://github.com/toptensoftware/PetaPoco
Unknown | 33 lines | 28 code | 5 blank | 0 comment | 0 complexity | 3dd7f9705e80a699fb50a8ea875f282e MD5 | raw file
 1<#@ include file="PetaPoco.Core.ttinclude" #>
 2<#
 3	// Settings
 4    ConnectionStringName = "";			// Uses last connection string in config if not specified
 5    Namespace = "";
 6    RepoName = "";
 7    GenerateOperations = true;
 8	GeneratePocos = true;
 9	GenerateCommon = true;
10	ClassPrefix = "";
11	ClassSuffix = "";
12	TrackModifiedColumns = false;
13
14    // Read schema
15	var tables = LoadTables();
16
17
18/*
19	// Tweak Schema
20	tables["tablename"].Ignore = true;							// To ignore a table
21	tables["tablename"].ClassName = "newname";					// To change the class name of a table
22	tables["tablename"]["columnname"].Ignore = true;			// To ignore a column
23	tables["tablename"]["columnname"].PropertyName="newname";	// To change the property name of a column
24	tables["tablename"]["columnname"].PropertyType="bool";		// To change the property type of a column
25*/
26
27	// Generate output
28	if (tables.Count>0)
29	{
30#>
31<#@ include file="PetaPoco.Generator.ttinclude" #>
32<# } #>
33