1

i have a problem with WKT and DbGeometry working together. When i use POINT as geometry like this example it works good.

DbGeometry myGeometry1 = DbGeometry.FromText("POINT (30 10)");
DbGeometry myGeometry2 = DbGeometry.PointFromText("POINT (30 10)", 0);

if i use POLYGON or any other geometry instead, it doesn't work at all.

DbGeometry myGeometry3 = DbGeometry.FromText("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))");
DbGeometry myGeometry4 = DbGeometry.PolygonFromText("POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))", 0);

This is the Platform Stack:

Entity Framework 6 ASP.NET 4.5 SQLServer 2016 LocalDB

1 Answers1

0

Just install SQLSysClrTypes_x86.msi and SQLSysClrTypes_x64.msi

from Microsoft SQL Server 2016 Feature Pack

https://www.microsoft.com/en-us/download/details.aspx?id=52676

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/low-quality-posts/22955563) – Nico Haase May 08 '19 at 09:21
  • I got your point, it actually happened to me many times. In that case just google for Microsoft SQL Server 2016 Feature Pack –  May 08 '19 at 11:55