35
35
if (string.IsNullOrEmpty(Namespace)) Namespace=ConnectionStringName;
36
36
if (string.IsNullOrEmpty(Namespace)) Namespace="OrmLitePoco";
37
37
var manager = Manager.Create(Host, GenerationEnvironment);
38
- manager.StartHeader(); #>// <auto-generated />
38
+ manager.StartHeader();
39
+ #>
40
+ // <auto-generated />
39
41
// This file was generated by a T4 template.
40
42
// Don't change it directly as your change would get overwritten. Instead, make changes
41
43
// to the .tt file (i.e. the T4 template) and save it to regenerate this file.
@@ -61,7 +63,7 @@ manager.StartNewFile(tbl.Name + ".cs");
61
63
[NamedConnection("<#=!string.IsNullOrEmpty(UseSpecificNamedConnection) ? UseSpecificNamedConnection : ConnectionStringName#>")]
62
64
<#}#>
63
65
<# if (MakeSingular) {#>
64
- [Alias("<#=tbl.Name#>")]
66
+ [Alias("<#=tbl.Name#>")]
65
67
<#}#>
66
68
<# if (UseSchemaAttribute && !string.IsNullOrEmpty(tbl.Schema) && tbl.Schema != "dbo") {#>
67
69
[Schema("<#=tbl.Schema#>")]
@@ -96,12 +98,12 @@ priorProperyNames.Add(col.PropertyName);
96
98
<# } if (col.IsNullable != true && col.IsAutoIncrement != true) { #>
97
99
[Required]
98
100
<# } if (!col.IsPK){#>
99
- public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set;}
101
+ public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set; }
100
102
<# } if (col.IsPK && UseIdAsPK) { #>
101
- public <#=col.ProperPropertyType#> Id { get; set;}
103
+ public <#=col.ProperPropertyType#> Id { get; set; }
102
104
<# } if (col.IsPK && !UseIdAsPK) { #>
103
105
[PrimaryKey]
104
- public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set;}
106
+ public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set; }
105
107
<# } #>
106
108
<# } #>
107
109
}
@@ -118,29 +120,29 @@ var isArray = col.ProperPropertyType.Contains("[]");
118
120
var isBool = col.ProperPropertyType.Contains("bool");
119
121
var isGuid = col.ProperPropertyType.Contains("Guid");
120
122
if (!col.IsPK){#>
121
- public <#=!isArray && !isString ? nullablePropType : col.ProperPropertyType#> <#=ormName#> { get; set;}
123
+ public <#=!isArray && !isString ? nullablePropType : col.ProperPropertyType#> <#=ormName#> { get; set; }
122
124
<# } if (col.IsPK && UseIdAsPK) { #>
123
125
public <#=isString ? "string" : nullablePropType#> Id { get; set;}
124
126
<# } if (col.IsPK && !UseIdAsPK) { #>
125
- public <#=isString ? "string" : nullablePropType#> <#=col.PropertyName#> { get; set;}<# }
127
+ public <#=isString ? "string" : nullablePropType#> <#=col.PropertyName#> { get; set; }<# }
126
128
127
129
if (isString){ #>
128
- public <#=col.ProperPropertyType#> <#=ormName#>StartsWith { get; set;}
129
- public <#=col.ProperPropertyType#> <#=ormName#>EndsWith { get; set;}
130
- public <#=col.ProperPropertyType#> <#=ormName#>Contains { get; set;}
131
- public <#=col.ProperPropertyType#> <#=ormName#>Like { get; set;}
132
- public <#=col.ProperPropertyType#>[] <#=ormName#>Between { get; set;}
133
- public <#=col.ProperPropertyType#>[] <#=ormName#>In { get; set;}
130
+ public <#=col.ProperPropertyType#> <#=ormName#>StartsWith { get; set; }
131
+ public <#=col.ProperPropertyType#> <#=ormName#>EndsWith { get; set; }
132
+ public <#=col.ProperPropertyType#> <#=ormName#>Contains { get; set; }
133
+ public <#=col.ProperPropertyType#> <#=ormName#>Like { get; set; }
134
+ public <#=col.ProperPropertyType#>[] <#=ormName#>Between { get; set; }
135
+ public <#=col.ProperPropertyType#>[] <#=ormName#>In { get; set; }
134
136
<#}
135
137
else if (!isArray && !isBool) { if (!isGuid) {#>
136
- public <#=nullablePropType#> <#=ormName#>GreaterThanOrEqualTo { get; set;}
137
- public <#=nullablePropType#> <#=ormName#>GreaterThan { get; set;}
138
- public <#=nullablePropType#> <#=ormName#>LessThan { get; set;}
139
- public <#=nullablePropType#> <#=ormName#>LessThanOrEqualTo { get; set;}
140
- public <#=nullablePropType#> <#=ormName#>NotEqualTo { get; set;}
141
- public <#=col.ProperPropertyType#>[] <#=ormName#>Between { get; set;}
138
+ public <#=nullablePropType#> <#=ormName#>GreaterThanOrEqualTo { get; set; }
139
+ public <#=nullablePropType#> <#=ormName#>GreaterThan { get; set; }
140
+ public <#=nullablePropType#> <#=ormName#>LessThan { get; set; }
141
+ public <#=nullablePropType#> <#=ormName#>LessThanOrEqualTo { get; set; }
142
+ public <#=nullablePropType#> <#=ormName#>NotEqualTo { get; set; }
143
+ public <#=col.ProperPropertyType#>[] <#=ormName#>Between { get; set; }
142
144
<#}#>
143
- public <#=col.ProperPropertyType#>[] <#=ormName#>In { get; set;}
145
+ public <#=col.ProperPropertyType#>[] <#=ormName#>In { get; set; }
144
146
<#}#>
145
147
146
148
<# } #>
0 commit comments