Utilizing the ServiceStack.OrmLite.SqlServer.Converters to use geography & geometry introduces a dependency in the ServiceModel on ServiceStack.OrmLite.SqlServer.Converters, which is bad practice.
Am I missing an interface somewhere else or is there a recommended path to mitigate this?
Not sure what dependencies you're referring to? But it only has the exact deps its needs:
- Microsoft.SqlServer.Types (>= 11.0.2)
- ServiceStack.OrmLite.SqlServer (>= 4.5.14)
I'm referring to my ServiceModel now having a dependency on these types.
Wait you mean your own Service Model? The only way to decouple it is to create a DTO and copy the values over.
Yeah I was talking about my own Service Model. I think I see what you are saying, I might hide my "SqlGeography" using classes away somewhere, only returning Lat/Lng to the outside world.
One other thing just bit me: SqlGeography is currently not supported in .NET Core is it?
Yeah the Microsoft.SqlServer.Types package only has .NET v4.0 Framework builds.