mehrandvd
mehrandvd

Reputation: 9116

Multiple DbGeography classes exists, which one is correct?

There's 2 DbGeography classes with these namespaces:

System.Data.Entity.Spatial.DbGeography    (Entity Framework)
System.Data.Spatial.DbGeograph            (.Net Framework)

which one should I use?

Upvotes: 1

Views: 113

Answers (1)

Peter
Peter

Reputation: 12711

If you're using EF 6, then System.Data.Entity.Spatial.DbGeography is the correct one to use. You should also remove any assembly references to System.Data.Entity.dll.

A lot of things got moved from the System.Data namespace to the System.Data.Entity namespace (and moved from the System.Data.Entity.dll to EntityFramework.dll) in EF6.

Upvotes: 1

Related Questions