有什么区别? 都是在获取数据存入内存之前在sql端执行函数吗?
附言:
最佳答案
如文档所述EntityFunctions
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).
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.
Provides common language runtime (CLR) methods that call functions in the database in LINQ to Entities queries.
因此,虽然两组函数都被翻译成原生 SQL,但 SQLFunctions 是特定于 SQL Server 的,而 EntityFunctions 不是。
关于c# - SqlFunctions 和 EntityFunctions 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15637317/