Microsoft.Data namespace missing dbGeometry

Allanjb 246 Reputation points
2020-12-20T00:35:52.277+00:00

I am developing an application in WPF. Target framework: .Net Core 3.1, x86 platform.
I have installed the Nuget Package: Microsoft.Data.SqlClient.
My db is SqlExpress.

I have a table with a sys.geometry type, (stores a coordinate pair, global coordinates).

I cannot find a reference to the equivalent .Net data type in Microsoft.Data.SqlClient.

I can find a reference in System.Data.Entity.Spatial namespace but this namespace is not present in .NetCore 3.1

Am I missing a package?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,783 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,961 questions
{count} votes

Accepted answer
  1. ErikEJ 341 Reputation points MVP
    2020-12-20T19:53:41.637+00:00

    Those types are not available for .NET Core, you can use dotMorten.Microsoft.SqlServer.Types while Microsoft gets them implemented.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.