SQL Server Types 5.6 and Above

Posts   
 
    
GraemeMuir
User
Posts: 6
Joined: 05-Mar-2021
# Posted on: 17-Jun-2021 06:10:38   

We are trying to upgrade our project from version 5.3 to 5.8, the main reason is to remove our dependency on SQLServer.Types for a couple of entities/tables that have a SQLGeometry or SQLGeography column.

We try and generate the code but the generated code still requires references to Micosroft.SQLServer.Types.

We try and set the field mapping for the column to be the geography type in SD.LLBLGen.Pro.DBDRiverCore.SpatialGeography.

But we get.

public virtual Microsoft.SqlServer.Types.SqlGeography Coordinate
{
    get { return (Microsoft.SqlServer.Types.SqlGeography)GetValue((int)GoogleMapCoordinateFieldIndex.Coordinate, true); }
    set { SetValue((int)GoogleMapCoordinateFieldIndex.Coordinate, value); }
}

Have we misunderstood the point of the 5.6 release or should we be able generate a class that no longer needs a reference to SQLServer.Types?

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 17-Jun-2021 07:33:10   

Hi Graeme,

The change for LLBLGen Designer is a better spatial type support. It no longer relies on Microsoft.SqlServer.Types to model spatial types in models and have added support for spatial types for PostgreSQL as well. It now uses Internal Types

For LLBLGen Runtime Framework, it's basically the same as previous versions, except now the runtime now also supports spatial types on PostgreSQL, on both .NET Full and .NET Standard. So, for Runtime, you need to install the Microsoft.SqlServer.Types nuget packge. Ref..

What is the reason you don't the Microsoft.SqlServer.Types dependency in your project?

David Elizondo | LLBLGen Support Team