Excuse me for wirintg directly to you, instead of creating an issue in Codeplex, but I've found a little bug, and its solution. However I have not examined it very deeply.
Bug found:
--> Trying to make reverse engineer of SQL Server 2012 Adventure Works, the property for the field "SpatialLocation" in table "Person.Address" is declareed as type:
System.Data.Spatial.DbGeography?
As DbGeography is not a value type, it can't be made nullable, using ?.
The solution is changing EF.Reverse.POCO.Core.ttinclude.
The if on line 100 checks if a "?" must be added after the property type.
This if checks the types: Microsoft.SqlServer.Types.SqlGeometry/SqlGeography
but not the types System.Data.Spatial.DbGeography/DbGeometry.
You can simply check if the data type ends with Geography or Geometry so that all the possible spatial types are covered.
I don't know the exact reason of the problem, but I think this solution will work in all cases.
Thanks for such absolutlety great tool.
Jorge Bustos <jabustosp@gmail.com>
Bug found:
--> Trying to make reverse engineer of SQL Server 2012 Adventure Works, the property for the field "SpatialLocation" in table "Person.Address" is declareed as type:
System.Data.Spatial.DbGeography?
As DbGeography is not a value type, it can't be made nullable, using ?.
The solution is changing EF.Reverse.POCO.Core.ttinclude.
The if on line 100 checks if a "?" must be added after the property type.
This if checks the types: Microsoft.SqlServer.Types.SqlGeometry/SqlGeography
but not the types System.Data.Spatial.DbGeography/DbGeometry.
You can simply check if the data type ends with Geography or Geometry so that all the possible spatial types are covered.
I don't know the exact reason of the problem, but I think this solution will work in all cases.
Thanks for such absolutlety great tool.
Jorge Bustos <jabustosp@gmail.com>