是什么SqlFunctions和EntityFunctions之间的区别? [英] What is the difference between SqlFunctions and EntityFunctions?

查看:192
本文介绍了是什么SqlFunctions和EntityFunctions之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么区别?
都用来在SQL端执行函数之前获取数据,并将其存储在内存中?

What's the difference ? Are both used to perform functions in sql side before get data and store them in memory ?

P.S:结果
在LINQ两个用于entites的。

P.S:
Both used in linq to entites.

推荐答案

随着文档状态<一个href=\"http://msdn.microsoft.com/en-us/library/system.data.objects.entityfunctions.aspx\">EntityFunctions

提供公共语言运行时(CLR),揭露概念性方法
  在LINQ模型规范函数to Entities查询。有关信息
  关于规范功能,请参见规范函数(实体SQL)。

Provides common language runtime (CLR) methods that expose conceptual model canonical functions in LINQ to Entities queries. For information about canonical functions, see Canonical Functions (Entity SQL).

的功能

由所有数据提供支持,并且可以通过所有查询可使用
  技术。规范函数不能由一个提供商进行扩展。
  这些规范函数将被转换成相应的数据
  为提供源功能。这允许功能
  调用前$ P $的常见形式跨数据源pssed。

are supported by all data providers, and can be used by all querying technologies. Canonical functions cannot be extended by a provider. These canonical functions will be translated to the corresponding data source functionality for the provider. This allows for function invocations expressed in a common form across data sources.

而<一个href=\"http://msdn.microsoft.com/en-us/library/system.data.objects.sqlclient.sqlfunctions.aspx\">SQLFunctions

提供公共语言运行时(CLR)调用的函数的方法
  数据库中的LINQ to Entities查询。

Provides common language runtime (CLR) methods that call functions in the database in LINQ to Entities queries.

因此​​,虽然功能两组转化为本地的SQL,SQLFunctions是SQL Server特定的,而EntityFunctions都没有。

Therefore although both sets of functions are translated into native SQL, SQLFunctions are SQL Server specific, whereas EntityFunctions aren't.

这篇关于是什么SqlFunctions和EntityFunctions之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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