Property type of 'System.Data.Entity.Spatial.DbGeography' which cannot be mapped to a primitive type

c# entity-framework-6 spatial-data visual-studio-2015

Question

Updated from EF 5.0 to 6.2 (designer from database) and getting the error:

Schema specified is not valid. Errors: The relationship 'CWPP.FK_Coordinates' was not loaded because the type 'CWPP.Coordinate' is not available. The following information may be useful in resolving the previous error: The property 'geo' on the type 'CWPP.Data.Coordinate' has a property type of 'System.Data.Entity.Spatial.DbGeography' which cannot be mapped to a primitive type.

I've followed the the steps here: Upgrading to Entity Framework 6

Stack overflow question here: Schema specified is not valid. Errors: 'System.Data.Spatial.DbGeography' which cannot be mapped to a primitive type

and read through the other related questions / answers on stack overflow. I've also tried completely deleting the entity model and recreating it, but still the same error. It seems like it's still trying to reference EF 5.0 but 6.2 is all that's installed. The reference to System.Data.Entity has been removed.

enter image description here

Any advice would be appreciated. Thanks.

1
0
6/27/2018 5:35:57 PM

Popular Answer

We finally figured out what our problem was. I'll post hoping it may help someone else. We were using Entity Data Source with a few of our controls and this is no longer supported with EF 6.

Here's the corresponding stack overflow Q/A that helped us: EntityDataSource and Entity Framework 6

0
7/2/2018 1:20:44 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