简体   繁体   English

Linq和实体框架进行空间查询

[英]spatial queries with Linq and Entity Framework

Looking at this basic example taken from here : 看着取自这个基本的例子在这里

var university = (from u in context.Universities 
                        orderby u.Location.Distance(myLocation) 
                        select u).FirstOrDefault();

I am wondering where the distance calculation is performed in the situation where the database server is different from the machine hosting the .Net process. 我想知道在数据库服务器与承载.Net进程的计算机不同的情况下,在哪里执行距离计算。 Does the above code issue a sql statement that ultimately hits the sql server machine? 上面的代码是否发出最终会命中sql server机器的sql语句?

Does the above code issue a sql statement that ultimately hits the sql server machine? 上面的代码是否发出最终会命中sql server机器的sql语句?

Yes. 是。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM