Answer the question
In order to leave comments, you need to log in
EF 6 throws exception when using DBGeography type?
I'm trying to use the DBGeography type from the System.Data.Entity.Spatial namespace in EF6 but ef throws the following exception:
There is no store type corresponding to the conceptual side type 'Geography' of primitive type 'Geography'.
Here is the class itself:
public class Coordinate : IObject
{
public int Id { get; set; }
public DbGeography Location { get; set; }
public string Address { get; set; }
public bool Status { get; set; }
}
Answer the question
In order to leave comments, you need to log in
Judging by the version number you have Sql Server Express 2005 - it's still an old DBMS.
And spatial types appeared only in Sql Server 2008: https://msdn.microsoft.com/en-us/library/cc280766.aspx
https://msdn.microsoft.com/en-us/library/bb964711(...
So EF justifiably swears.You should install a newer DBMS.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question