/PetaPoco/Models/Generated/Database.tt
http://github.com/toptensoftware/PetaPoco · TemplateToolkit · 33 lines · 28 code · 5 blank · 0 comment · 0 complexity · 3dd7f9705e80a699fb50a8ea875f282e MD5 · raw file
- <#@ include file="PetaPoco.Core.ttinclude" #>
- <#
- // Settings
- ConnectionStringName = ""; // Uses last connection string in config if not specified
- Namespace = "";
- RepoName = "";
- GenerateOperations = true;
- GeneratePocos = true;
- GenerateCommon = true;
- ClassPrefix = "";
- ClassSuffix = "";
- TrackModifiedColumns = false;
- // Read schema
- var tables = LoadTables();
- /*
- // Tweak Schema
- tables["tablename"].Ignore = true; // To ignore a table
- tables["tablename"].ClassName = "newname"; // To change the class name of a table
- tables["tablename"]["columnname"].Ignore = true; // To ignore a column
- tables["tablename"]["columnname"].PropertyName="newname"; // To change the property name of a column
- tables["tablename"]["columnname"].PropertyType="bool"; // To change the property type of a column
- */
- // Generate output
- if (tables.Count>0)
- {
- #>
- <#@ include file="PetaPoco.Generator.ttinclude" #>
- <# } #>