Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit b8fb838

Browse files
authored
Merge pull request #537 from stuartbfs/master
Applied some white space changes to the T4 template as the whitespace…
2 parents 253acdd + 6a91e98 commit b8fb838

File tree

1 file changed

+22
-20
lines changed

1 file changed

+22
-20
lines changed

src/T4/OrmLite.Poco.tt

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
if (string.IsNullOrEmpty(Namespace)) Namespace=ConnectionStringName;
3636
if (string.IsNullOrEmpty(Namespace)) Namespace="OrmLitePoco";
3737
var manager = Manager.Create(Host, GenerationEnvironment);
38-
manager.StartHeader(); #>// <auto-generated />
38+
manager.StartHeader();
39+
#>
40+
// <auto-generated />
3941
// This file was generated by a T4 template.
4042
// Don't change it directly as your change would get overwritten. Instead, make changes
4143
// 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");
6163
[NamedConnection("<#=!string.IsNullOrEmpty(UseSpecificNamedConnection) ? UseSpecificNamedConnection : ConnectionStringName#>")]
6264
<#}#>
6365
<# if (MakeSingular) {#>
64-
[Alias("<#=tbl.Name#>")]
66+
[Alias("<#=tbl.Name#>")]
6567
<#}#>
6668
<# if (UseSchemaAttribute && !string.IsNullOrEmpty(tbl.Schema) && tbl.Schema != "dbo") {#>
6769
[Schema("<#=tbl.Schema#>")]
@@ -96,12 +98,12 @@ priorProperyNames.Add(col.PropertyName);
9698
<# } if (col.IsNullable != true && col.IsAutoIncrement != true) { #>
9799
[Required]
98100
<# } if (!col.IsPK){#>
99-
public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set;}
101+
public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set; }
100102
<# } if (col.IsPK && UseIdAsPK) { #>
101-
public <#=col.ProperPropertyType#> Id { get; set;}
103+
public <#=col.ProperPropertyType#> Id { get; set; }
102104
<# } if (col.IsPK && !UseIdAsPK) { #>
103105
[PrimaryKey]
104-
public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set;}
106+
public <#=col.ProperPropertyType#> <#=col.PropertyName#> { get; set; }
105107
<# } #>
106108
<# } #>
107109
}
@@ -118,29 +120,29 @@ var isArray = col.ProperPropertyType.Contains("[]");
118120
var isBool = col.ProperPropertyType.Contains("bool");
119121
var isGuid = col.ProperPropertyType.Contains("Guid");
120122
if (!col.IsPK){#>
121-
public <#=!isArray && !isString ? nullablePropType : col.ProperPropertyType#> <#=ormName#> { get; set;}
123+
public <#=!isArray && !isString ? nullablePropType : col.ProperPropertyType#> <#=ormName#> { get; set; }
122124
<# } if (col.IsPK && UseIdAsPK) { #>
123125
public <#=isString ? "string" : nullablePropType#> Id { get; set;}
124126
<# } if (col.IsPK && !UseIdAsPK) { #>
125-
public <#=isString ? "string" : nullablePropType#> <#=col.PropertyName#> { get; set;}<# }
127+
public <#=isString ? "string" : nullablePropType#> <#=col.PropertyName#> { get; set; }<# }
126128

127129
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; }
134136
<#}
135137
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; }
142144
<#}#>
143-
public <#=col.ProperPropertyType#>[] <#=ormName#>In { get; set;}
145+
public <#=col.ProperPropertyType#>[] <#=ormName#>In { get; set; }
144146
<#}#>
145147

146148
<# } #>

0 commit comments

Comments
 (0)