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

Getting the following problem after updating from EF 5.0 to 6.2 (designer from database):

The supplied schema is invalid. Errors: Because the type 'CWPP.Coordinate' is not accessible, the relationship 'CWPP.FK Coordinates' could not be loaded. The following details might be helpful in fixing the earlier error: A primitive type cannot be mapped to the property 'geo' of the type 'CWPP.Data.Coordinate' since it has a property type of 'System.Data.Entity.Spatial.DbGeography'.

I followed these instructions: Entity Framework 6 upgrade

Here's the stack overflow code: The supplied schema is invalid. 'System' errors. Data.Spatial.DbGeography' which cannot be mapped to a primitive type

Also browse the further relevant questions and answers on stack overflow. The problem persists despite my attempts to totally delete and recreate the entity model. It seems to be still attempting to reference EF 5.0 even though just 6.2 has been installed. System.Data.Entity has no longer been mentioned.

enter image description here

I would appreciate any input. Thanks.

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

Popular Answer

We identified the source of our issue in the end. I'll publish in the hopes that it will assist someone else. A couple of our controls were utilising Entity Data Source, however EF 6 no longer supports this.

Here is the relevant stack overflow answer that was helpful to us: the Entity Framework 6 and EntityDataSource

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