SqlGeometry in Entity Framework Core

entity-framework-core sqlgeometry sql-server

Question

I'm trying to work with Entity Framework Core against a SQL Server database.

I've got a test class (based on Microsoft's demo 'blog/post' sample code) which I migrate to a SQL Server database.

I want to add a member to my test class which will save as a SqlGeometry column and allow me to read/write that data.

It doesn't seem that there is an appropriate geometry type in Entity Framework/ .NET Core - so how should I approach the problem?

1
1
3/16/2017 12:38:11 PM

Accepted Answer

You can see a workaround here, which will enable you to use this unsupported data type: https://github.com/aspnet/EntityFramework/issues/1100#issuecomment-286362657

2
3/16/2017 12:53:40 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow