Skip to content

Commit 5f86e34

Browse files
committed
Revision bump
1 parent 276861b commit 5f86e34

File tree

17 files changed

+43
-35
lines changed

17 files changed

+43
-35
lines changed

BuildTT/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.1.2
1+
3.1.3
Binary file not shown.
Binary file not shown.
437 Bytes
Binary file not shown.

EntityFramework Reverse POCO Generator/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@
3030
// You can specify all the values or you can default the Build and Revision Numbers
3131
// by using the '*' as shown below:
3232
// [assembly: AssemblyVersion("1.0.*")]
33-
[assembly: AssemblyVersion("3.1.2.0")]
34-
[assembly: AssemblyFileVersion("3.1.2.0")]
33+
[assembly: AssemblyVersion("3.1.3.0")]
34+
[assembly: AssemblyFileVersion("3.1.3.0")]

EntityFramework Reverse POCO Generator/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="EntityFramework_Reverse_POCO_Generator..d542a934-8bd6-4136-b490-5f0049d62033" Version="3.1.2" Language="en-US" Publisher="Simon Hughes" />
4+
<Identity Id="EntityFramework_Reverse_POCO_Generator..d542a934-8bd6-4136-b490-5f0049d62033" Version="3.1.3" Language="en-US" Publisher="Simon Hughes" />
55
<DisplayName>EntityFramework Reverse POCO Generator</DisplayName>
66
<Description xml:space="preserve">Reverse engineers an existing database and generates EntityFramework Code First POCO classes, Configuration mappings and DbContext.</Description>
77
<MoreInfo>https://github.com/sjh37/EntityFramework-Reverse-POCO-Code-First-Generator</MoreInfo>

EntityFramework.Reverse.POCO.Generator/Database NorthwindSqlCe40.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#@ include file="EF.Reverse.POCO.v3.ttinclude" #>
22
<#
3-
// v3.1.2
3+
// v3.1.3
44
// Please make changes to the settings below.
55
// All you have to do is save this file, and the output file(s) are generated. Compiling does not regenerate the file(s).
66
// A course for the older v2 generator is available on Pluralsight at https://www.pluralsight.com/courses/code-first-entity-framework-legacy-databases

EntityFramework.Reverse.POCO.Generator/Database.tt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#@ include file="EF.Reverse.POCO.v3.ttinclude" #>
22
<#
3-
// v3.1.2
3+
// v3.1.3
44
// Please make changes to the settings below.
55
// All you have to do is save this file, and the output file(s) are generated. Compiling does not regenerate the file(s).
66
// A course for the older v2 generator is available on Pluralsight at https://www.pluralsight.com/courses/code-first-entity-framework-legacy-databases
@@ -58,6 +58,8 @@
5858
FilterSettings.TableFilters.Add(new RegexExcludeFilter("__EFMigrationsHistory")); // This excludes all tables starting with 'AspNet'
5959
//FilterSettings.ColumnFilters.Add(new RegexExcludeFilter("[Cc]reated[Aa]t.*")); // This excludes all columns starting with 'CreatedAt' e.g CreatedAtUtc
6060
//FilterSettings.ColumnFilters.Add(new RegexIncludeFilter(".*")); // Rarely used as it would only include columns with names listed here
61+
//FilterSettings.StoredProcedureFilters.Add(new RegexExcludeFilter("Calc")); // This excludes all stored procedures 'Calc' in the name
62+
//FilterSettings.StoredProcedureFilters.Add(new RegexIncludeFilter("Pricing.*")); // This includes all stored procedures starting with 'Pricing'
6163

6264
// Other settings *********************************************************************************************************************
6365
Settings.CommandTimeout = 600; // SQL Command timeout in seconds. 600 is 10 minutes, 0 will wait indefinitely. Some databases can be slow retrieving schema information.

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

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<#
22
// Copyright (C) Simon Hughes 2012
3-
// v3.1.2
3+
// v3.1.3
44
// If you want to submit a pull request, please modify the Generator C# project as this file
55
// is automatically constructed from the C# Generator project during the build process.
66
#>
@@ -916,9 +916,14 @@
916916
"object",
917917
"microsoft.sqlserver.types.sqlgeography",
918918
"microsoft.sqlserver.types.sqlgeometry",
919+
"sqlgeography",
920+
"sqlgeometry",
919921
"system.data.entity.spatial.dbgeography",
920922
"system.data.entity.spatial.dbgeometry",
923+
"dbgeography",
924+
"dbgeometry",
921925
"system.data.entity.hierarchy.hierarchyid",
926+
"hierarchyid",
922927
"nettopologysuite.geometries.point",
923928
"nettopologysuite.geometries.geometry"
924929
};
@@ -945,7 +950,7 @@
945950

946951
public void CleanUpDefault()
947952
{
948-
if (string.IsNullOrWhiteSpace(Default))
953+
if (string.IsNullOrWhiteSpace(Default) || IsSpatial)
949954
{
950955
Default = string.Empty;
951956
return;
@@ -1226,7 +1231,7 @@
12261231
{
12271232
public static string Version()
12281233
{
1229-
return "v3.1.2";
1234+
return "v3.1.3";
12301235
}
12311236
}
12321237

@@ -4889,10 +4894,6 @@
48894894
var sb = new StringBuilder(255);
48904895
sb.AppendFormat(".HasColumnName(@\"{0}\")", c.DbName);
48914896

4892-
var doNotSpecifySize = false;
4893-
if (!c.IsMaxLength && c.MaxLength > 0)
4894-
doNotSpecifySize = (DatabaseReader.DoNotSpecifySizeForMaxLength && c.MaxLength > 4000); // Issue #179
4895-
48964897
if (!string.IsNullOrEmpty(c.SqlPropertyType))
48974898
sb.AppendFormat(".HasColumnType(\"{0}\")", c.SqlPropertyType);
48984899

@@ -4906,6 +4907,8 @@
49064907

49074908
if (!c.IsMaxLength && c.MaxLength > 0)
49084909
{
4910+
var doNotSpecifySize = (DatabaseReader.DoNotSpecifySizeForMaxLength && c.MaxLength > 4000); // Issue #179
4911+
49094912
if (doNotSpecifySize)
49104913
sb.Append(".HasMaxLength(null)");
49114914
else
@@ -5967,6 +5970,9 @@
59675970
{
59685971
public Dictionary<string, string> GetMapping()
59695972
{
5973+
var geographyType = Settings.TemplateType == TemplateType.Ef6 ? "DbGeography" : "NetTopologySuite.Geometries.Point";
5974+
var geometryType = Settings.TemplateType == TemplateType.Ef6 ? "DbGeometry" : "NetTopologySuite.Geometries.Geometry";
5975+
59705976
// [Database type] = Language type
59715977
return new Dictionary<string, string>
59725978
{
@@ -5993,8 +5999,8 @@
59935999
{ "fixed", "decimal" },
59946000
{ "float unsigned", "decimal" },
59956001
{ "float", "double" },
5996-
{ "geography", Settings.TemplateType == TemplateType.Ef6 ? "Spatial.DbGeography" : "NetTopologySuite.Geometries.Point" },
5997-
{ "geometry", Settings.TemplateType == TemplateType.Ef6 ? "Spatial.DbGeometry" : "NetTopologySuite.Geometries.Geometry" },
6002+
{ "geography", Settings.DisableGeographyTypes ? string.Empty : geographyType },
6003+
{ "geometry", Settings.DisableGeographyTypes ? string.Empty : geometryType },
59986004
{ "int unsigned", "long" },
59996005
{ "int", "int" },
60006006
{ "integer unsigned", "long" },
@@ -6103,7 +6109,7 @@
61036109
{ "citext", "string" },
61046110
{ "date", "DateTime" },
61056111
{ "double precision", "double" },
6106-
{ "geometry", "PostgisGeometry" },
6112+
{ "geometry", Settings.DisableGeographyTypes ? string.Empty : "PostgisGeometry" },
61076113
{ "hstore", "Dictionary<string, string>" },
61086114
{ "inet", "NpgsqlInet" },
61096115
{ "integer", "int" },
@@ -6151,6 +6157,9 @@
61516157
// [Database type] = Language type
61526158
public Dictionary<string, string> GetMapping()
61536159
{
6160+
var geographyType = Settings.TemplateType == TemplateType.Ef6 ? "DbGeography" : "NetTopologySuite.Geometries.Point";
6161+
var geometryType = Settings.TemplateType == TemplateType.Ef6 ? "DbGeometry" : "NetTopologySuite.Geometries.Geometry";
6162+
61546163
return new Dictionary<string, string>
61556164
{
61566165
{ string.Empty, "string" }, // default
@@ -6163,8 +6172,8 @@
61636172
{ "datetimeoffset", "DateTimeOffset" },
61646173
{ "decimal", "decimal" },
61656174
{ "float", "double" },
6166-
{ "geography", Settings.TemplateType == TemplateType.Ef6 ? "Spatial.DbGeography" : "NetTopologySuite.Geometries.Point" },
6167-
{ "geometry", Settings.TemplateType == TemplateType.Ef6 ? "Spatial.DbGeometry" : "NetTopologySuite.Geometries.Geometry" },
6175+
{ "geography", Settings.DisableGeographyTypes ? string.Empty : geographyType },
6176+
{ "geometry", Settings.DisableGeographyTypes ? string.Empty : geometryType },
61686177
{ "hierarchyid", "Hierarchy.HierarchyId" },
61696178
{ "image", "byte[]" },
61706179
{ "int", "int" },
@@ -6207,8 +6216,8 @@
62076216
{ "datetimeoffset", "string" },
62086217
{ "decimal", "Number" },
62096218
{ "float", "Number" },
6210-
{ "geography", "string" },
6211-
{ "geometry", "string" },
6219+
{ "geography", Settings.DisableGeographyTypes ? string.Empty : "string" },
6220+
{ "geometry", Settings.DisableGeographyTypes ? string.Empty : "string" },
62126221
{ "hierarchyid", "string" },
62136222
{ "image", "string" },
62146223
{ "int", "Number" },
@@ -14137,7 +14146,7 @@ SELECT SERVERPROPERTY('Edition') AS Edition,
1413714146
+ (p.Mode == StoredProcedureParameterMode.In ? "Input" : "Output")
1413814147
+ (p.Mode == StoredProcedureParameterMode.In
1413914148
? ", Value = " + (isGeography
14140-
? string.Format("SqlGeography.Parse({0}.AsText())", p.NameHumanCase)
14149+
? string.Format("Microsoft.SqlServer.Types.SqlGeography.Parse({0}.AsText())", p.NameHumanCase)
1414114150
: p.NameHumanCase + getValueOrDefault)
1414214151
: string.Empty)
1414314152
+ (p.MaxLength != 0 ? ", Size = " + p.MaxLength : string.Empty)
@@ -15192,6 +15201,7 @@ using {{this}};{{#newline}}
1519215201
{{#newline}}
1519315202
// Table Valued Functions{{#newline}}
1519415203
{{#each tableValuedFunctions}}
15204+
{{#newline}}
1519515205
[DbFunction(""{{DbContextName}}"", ""{{Name}}"")]{{#newline}}
1519615206
[CodeFirstStoreFunctions.DbFunctionDetails(DatabaseSchema = ""{{Schema}}""{{#if SingleReturnModel}}, ResultColumnName = ""{{SingleReturnColumnName}}""{{/if}})]{{#newline}}
1519715207
IQueryable<{{ReturnClassName}}> {{ExecName}}({{WriteStoredProcFunctionParamsFalse}});{{#newline}}
@@ -15239,7 +15249,9 @@ using {{this}};{{#newline}}
1523915249
}
1524015250

1524115251
if (data.hasStoredProcs)
15252+
{
1524215253
usings.Add("System.Collections.Generic");
15254+
}
1524315255

1524415256
if (!Settings.UseInheritedBaseInterfaceFunctions)
1524515257
{

Generator/EfrpgVersion.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public static class EfrpgVersion
44
{
55
public static string Version()
66
{
7-
return "v3.1.2";
7+
return "v3.1.3";
88
}
99
}
1010
}

0 commit comments

Comments
 (0)