[英]Entity Framework 5: DbGeography
I'm trying to access the DbGreography datatypes in my solution. 我正在尝试访问解决方案中的DbGreography数据类型。 I've installed EF5 via nuget.
我已经通过nuget安装了EF5。 I've referenced System.Data.Entity in which the spatial types are supposed to reside.
我已经引用了应该驻留空间类型的System.Data.Entity。 However, There dont seem to be any system.data.spatial namespace in there.
但是,那里似乎没有任何system.data.spatial命名空间。
I'm using vs.net 2012 also. 我也在使用vs.net 2012。
What am I missing here? 我在这里想念什么?
The geography types are in System.Data.Entity
assembly version 4.0.0.0. 地理类型在
System.Data.Entity
程序集版本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. 如果在安装EF5时项目的目标是其他框架,则可能会引用到3.5.0.0版本,该版本没有空间类型。 Make sure your project targets .NET 4.5 and that you have version 4.0.0.0 of System.Data.Entity referenced.
确保您的项目以.NET 4.5为目标,并且已引用System.Data.Entity的版本4.0.0.0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.