Skip to content

Commit 251bc5a

Browse files
committed
#61 Correct a bug with the #region implementation
1 parent a2cdd9a commit 251bc5a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

EntityFramework.Reverse.POCO.Generator/EF.Reverse.POCO.ttinclude

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ if (IncludeTableValuedFunctions)
171171
}
172172

173173
<# }
174-
if(!GenerateSeparateFiles) { #>
174+
if(ElementsToGenerate.HasFlag(Elements.UnitOfWork) && !GenerateSeparateFiles) { #>
175175
#endregion
176176

177177
<# }
@@ -459,7 +459,7 @@ if (IncludeTableValuedFunctions)
459459
<# } } }
460460
/**/#> }
461461
<# }
462-
if(!GenerateSeparateFiles) { #>
462+
if(ElementsToGenerate.HasFlag(Elements.Context) && !GenerateSeparateFiles) { #>
463463
#endregion
464464

465465
<# }
@@ -875,7 +875,7 @@ if (IncludeTableValuedFunctions)
875875
}
876876
<# } #>
877877
<# }
878-
if(!GenerateSeparateFiles) { #>
878+
if(ElementsToGenerate.HasFlag(Elements.Context) && AddUnitTestingDbContext && !GenerateSeparateFiles) { #>
879879

880880
#endregion
881881

@@ -975,7 +975,7 @@ if(MakeClassesPartial) {#>
975975
}
976976

977977
<# } }
978-
if(!GenerateSeparateFiles) { #>
978+
if(ElementsToGenerate.HasFlag(Elements.Poco) && !GenerateSeparateFiles) { #>
979979
#endregion
980980

981981
<# }
@@ -1038,7 +1038,7 @@ foreach (string s in tbl.MappingConfiguration)
10381038
<#}#> }
10391039

10401040
<# } }
1041-
if(!GenerateSeparateFiles) { #>
1041+
if(ElementsToGenerate.HasFlag(Elements.PocoConfiguration) && !GenerateSeparateFiles) { #>
10421042
#endregion
10431043

10441044
<# }
@@ -1094,7 +1094,7 @@ if(returnModelCount < 2)
10941094
}
10951095

10961096
<# }
1097-
if(!GenerateSeparateFiles) { #>
1097+
if(storedProcs.Any() && ElementsToGenerate.HasFlag(Elements.Poco) && !GenerateSeparateFiles) { #>
10981098
#endregion
10991099

11001100
<# } } #>

0 commit comments

Comments
 (0)