-
Notifications
You must be signed in to change notification settings - Fork 0
/
WTData.tt
55 lines (44 loc) · 2.37 KB
/
WTData.tt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<#@ include file="EF.Reverse.POCO.Core.ttinclude" #>
<#
// v1.10.0
// Settings
ConnectionStringName = "MyDbContext"; // Searches for this connection string in config files listed below
ConfigFilenameSearchOrder = new[] { "app.config", "web.config", "app.config.transform", "web.config.transform" }; // Add more here if required
// The config files are searched for in the local project first, then the whole solution second.
// Namespace = ""; // Override the namespace if you want to
DbContextName = "MyDbContext";
MakeClassesPartial = false;
GenerateSeparateFiles = false;
UseCamelCase = true; // This will rename the tables & fields to use CamelCase. If false table & field names will be left alone.
// WCF
AddWcfDataAttributes = false;
// This string is inserted into the [DataContract] attribute, before the closing square bracket.
ExtraWcfDataContractAttributes = "";
// Example: ""; = [DataContract]
// "(Namespace = \"http://www.contoso.com\")"; = [DataContract(Namespace = "http://www.contoso.com")]
// "(Namespace = Constants.ServiceNamespace)"; = [DataContract(Namespace = Constants.ServiceNamespace)]
// If there are multiple schema, then the table name is prefixed with the schema, except for dbo.
// Ie. dbo.hello will be Hello.
// abc.hello will be AbcHello.
// To only include a single schema, specify it below.
SchemaName = null;
// Use the following table/view name regex filters to include or exclude tables/views
// Exclude filters are checked first and tables matching filters are removed.
// * If left null, none are excluded.
// * If not null, any tables matching the regex are excluded.
// Include filters are checked second.
// * If left null, all are included.
// * If not null, only the tables matching the regex are included.
// Example: TableFilterExclude = new Regex(".*auto.*");
// TableFilterInclude = new Regex("(.*_FR_.*)|(data_.*)");
// TableFilterInclude = new Regex("^table_name1$|^table_name2$|etc");
TableFilterExclude = null;
TableFilterInclude = null;
// Read schema
var tables = LoadTables();
// Generate output
if (tables.Count>0)
{
#>
<#@ include file="EF.Reverse.POCO.ttinclude" #>
<# } #>