Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an implementation for SqlGeometryBuilder ?

Before the implementation of spatial types (System.Data.Spatial.DBGeometry) in the Entity Framework we could handle the lack of spatial support using "Microsoft.SqlServer.Types.SqlGeometry". This library has the class SqlGeometryBuilder which is use to create a SqlGeometry based on different geometric points.

I decided to move on from SqlGeometry to DBGeometry, but I haven't been able to find any function which does the same that SqlGeometryBuilder used to do. Do you know if is there any function for this? or Do you know if it would be included in next releases?

Thanks in advance.

like image 410
Laggel Avatar asked Nov 24 '22 17:11

Laggel


1 Answers

It's a very late response (I only just saw the question) but...

You can still implement SqlGeometryBuilder whilst using EF. You simply need to convert between DbGeometry and SqlGeometry to use it, and then back again from SqlGeometry to DbGeometry to pass back into the database. This is also helpful when you need to use functions implemented by SqlGeometry but not DbGeometry.

Hope it helps either now, or in a later project.

like image 141
Jon Bellamy Avatar answered Dec 10 '22 09:12

Jon Bellamy