Entity Framework 5: DbGeography
Asked Answered
N

1

0

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?

Neurosis answered 17/12, 2012 at 8:0 Comment(1)
Yes.. (apparently i have to write a long comment here otherwise the site wont accept the comment)Neurosis
D
1

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.

Delay answered 17/12, 2012 at 8:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.