首先实体框架代码的空间/ DBGeography属性索引 [英] Index on Spatial / DBGeography Property for Entity Framework Code First

查看:123
本文介绍了首先实体框架代码的空间/ DBGeography属性索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个EF(6.1)代码第一个项目,其中一个模型有一个DbGeography属性(将只包含POINT地理位置),我将执行查询。



我在官方指南后声明自定义索引,但是它缺少关于空间成员/属性的索引的细节,我想知道如何通过代码优先创建这些?



底层数据库将是/将是SQL Server 2012 if

解决方案

无法评论。



同样的问题 here



显然是不能完成。


I have an EF (6.1) code first project and one of its model has a DbGeography Property (which will contain only POINT geographies) which I'll perform queries against.

I declare custom indices following the official guide, however it is lacking details regarding indices for spatial members / properties and I was wondering how I can create those via Code First?

The underlying Database is / will be SQL Server 2012 if that plays any role.

解决方案

Could not comment.

Practically same question here.

Apparently it cannot be done.

这篇关于首先实体框架代码的空间/ DBGeography属性索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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