Skip to content

Commit efa7167

Browse files
authored
Update EntityFrameworkConvertToDbGeometry.cs
Kept old signature to avoid breaking change
1 parent de6ffbc commit efa7167

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed
Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
using System.Data.Entity.Spatial;
2-
using GeoJSON.Net.Geometry;
1+
using System.Data.Entity.Spatial;
2+
using GeoJSON.Net.Geometry;
33
using GeoJSON.Net.Contrib.Wkb.Conversions;
44

5-
namespace GeoJSON.Net.Contrib.EntityFramework
6-
{
7-
public static partial class EntityFrameworkConvert
8-
{
9-
public static DbGeometry ToDbGeometry(this IGeometryObject geometryObject, int coordinateSystemId = 4326)
10-
{
11-
return DbGeometry.FromBinary(WkbEncode.Encode(geometryObject), coordinateSystemId);
12-
}
13-
}
14-
}
5+
namespace GeoJSON.Net.Contrib.EntityFramework
6+
{
7+
public static partial class EntityFrameworkConvert
8+
{
9+
[Obsolete("This method will be removed in future releases, consider migrating now to the newest signature.", false)]
10+
public static DbGeometry ToDbGeometry(this IGeometryObject geometryObject)
11+
{
12+
return geometryObject.ToDbGeometry(4326);
13+
}
14+
public static DbGeometry ToDbGeometry(this IGeometryObject geometryObject, int coordinateSystemId = 4326)
15+
{
16+
return DbGeometry.FromBinary(WkbEncode.Encode(geometryObject), coordinateSystemId);
17+
}
18+
}
19+
}

0 commit comments

Comments
 (0)