实体框架5:DbGeography [英] Entity Framework 5: DbGeography

查看:100
本文介绍了实体框架5:DbGeography的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的解决方案中访问DbGreography数据类型。
我已经通过nuget安装了EF5。我引用了空间类型应该驻留的System.Data.Entity。
但是,在那里似乎没有任何system.data.spatial命名空间。

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.

我也在使用vsnet 2012。

I'm using vs.net 2012 also.

我在这里缺少什么?

推荐答案

地理类型在 System.Data.Entity 汇编版本4.0.0.0。如果您的项目在安装EF5时针对不同的框架,您可能还可以参考3.5.0.0版本,该版本没有空间类型。确保您的项目定位到.NET 4.5,并且引用了System.Data.Entity的4.0.0.0版本。

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.

这篇关于实体框架5:DbGeography的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆