简体   繁体   English

实体框架5:DbGeography

[英]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.

相关问题 DbGeography +实体框架5 + Silverlight + DomainService - DbGeography + entity framework 5 + Silverlight + DomainService 实体框架:SqlGeography与DbGeography - Entity Framework: SqlGeography vs DbGeography 实体框架DbGeography没有正确计算区域? - Entity Framework DbGeography not calculating the Area correctly? 将DbGeography Tyes与Entity Framework 7和vNext一起使用 - Using DbGeography Tyes with Entity Framework 7 and vNext 实体框架核心支持SQL空间数据类型 - DBGeography? - Entity Framework Core support for SQL Spatial Data Types - DBGeography? 在Entity Framework中索引DbGeography类型是否会提高查询性能? - Would indexing a DbGeography type in Entity Framework improve query performance? 如何在Linq中使用DbGeography.Filter和Entity Framework 5? - How to use DbGeography.Filter in Linq with Entity Framework 5? 如何在 Code First Entity Framework 中返回 DbGeography.Distance 计算值而不丢失强类型? - How to return DbGeography.Distance calculated value In Code First Entity Framework without losing strong typing? 实体类型“DbGeography”需要定义主键 - The entity type 'DbGeography' requires a primary key to be defined LINQ to Entity不支持DbGeography条件 - LINQ to Entity does not support DbGeography conditions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM