本机SQL和实体SQL之间的区别 [英] Difference between Native SQL and Entity SQL

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

问题描述



我看了一篇有关使用EntityConnection,EntityCommands执行Entity sql查询的文章.但是我无法理解为什么我们要使用实体sql?为什么不直接使用类和对象来处理数据库上的CRUD操作?

或者,如果要执行sql查询,那么为什么要使用Entity Sql,为什么不直接使用Ado.net?

是否有任何性能差异或其他原因?
我已经浏览过 http://msdn.microsoft.com/zh-CN/library/bb738573 .aspx [ ^ ] .但我想以更简单的方式回答.你能回答我吗?

谢谢

Hi,

I have gone through an article of using EntityConnection, EntityCommands for executing Entity sql queries. But I was unable to understand that Why are we using Entity sql? Why not directly using the Classes and objects for processing CRUD operations on database?

Or If we want to execute sql queries then why we are using Entity Sql , why not directly Ado.net ?

Is there any performance difference or something else?
I have already gone through the page http://msdn.microsoft.com/en-us/library/bb738573.aspx[^]. But I want answer in a more simpler way. Can you please answer me?

Thanks

推荐答案

主要区别

SQL是在存储(关系)对象上工作的依赖数据库的查询语言-表/行
ESQL是在概念(EDMX)对象上工作的独立于数据库的查询语言-实体
ESQL在LINQ之前创建.在某些情况下,ESQL提供了比LINQ更多的功能.
The main difference

SQL is database dependent query language working on storage (relational) objects - tables / rows
ESQL is database independent query language working on conceptual (EDMX) objects - entities
ESQL was created prior to LINQ. In some scenarios ESQL offers more functionality than LINQ.


这篇关于本机SQL和实体SQL之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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