Roger Johansson
Roger Johansson

Reputation: 23214

Entity Framework 5: DbGeography

I'm trying to access the DbGreography datatypes in my solution. I've installed EF5 via nuget. I've referenced System.Data.Entity in which the spatial types are supposed to reside. However, There dont seem to be any system.data.spatial namespace in there.

I'm using vs.net 2012 also.

What am I missing here?

Upvotes: 0

Views: 900

Answers (1)

Tim Long
Tim Long

Reputation: 13778

The geography types are in System.Data.Entity assembly version 4.0.0.0. If your project was targeting a different framework when you installed EF5, you may well have got a reference to version 3.5.0.0, which doesn't have the spatial types. Make sure your project targets .NET 4.5 and that you have version 4.0.0.0 of System.Data.Entity referenced.

Upvotes: 1

Related Questions