简体   繁体   English

实体框架查询设计器

[英]Entity framework query designer

SQL Server has great query designer that enable me to write every complex queries easily. SQL Server具有出色的查询设计器,使我能够轻松编写每个复杂的查询。 recently I'm involving with Entity framework. 最近,我参与了实体框架。 I know it has three ways to querying data. 我知道它有三种查询数据的方法。

  1. LINQ to Entites LINQ实体
  2. Entity SQL 实体SQL
  3. Query Method 查询方式

Is there any query designer for Entity framework like SQL query Designer ? 是否有诸如SQL查询设计器之类的实体框架的查询设计器? I'm familiar with LINQ PAD and also this LINQ query Designer(I was unable to use this software in windows 7 64 bit). 我熟悉LINQ PAD ,也熟悉 LINQ查询设计器(我无法在Windows 7 64位环境中使用此软件)。 what are your suggestions? 您有什么建议?

LINQPad is probably one of the best. LINQPad可能是最好的之一。 I really like that is shows me what the SQL was that was generated from my LINQ query and I can even look at the IL code. 我真的很喜欢这向我展示了从LINQ查询生成的SQL是什么,我什至可以查看IL代码。

It doesn't have a graphical designer like the SQL Query Designer and this isn't a bad thing. 它没有像SQL查询设计器这样的图形设计器,这不是一件坏事。 If you really want something like that you may as well just have that tool generate the SQL for you. 如果您真的想要这样的东西,您也可以让该工具为您生成SQL。 LINQ is querying data in C# and if you're querying the database then this is an abstraction. LINQ正在用C#查询数据,如果您正在查询数据库,则这是一个抽象。 A graphical designer for LINQ would be like layering a layer on top of an abstraction. LINQ的图形设计器就像在抽象之上分层。 There would be even more places the interpretation could go wrong and the SQL Query Designer is far from perfect. 解释可能会出错的地方甚至更多,而SQL查询设计器还远远不够完美。 I can't tell you how many times at my work people bring queries built with that tool to me and complain something doesn't work and I see that they have multiple joins that are just incorrect or subqueries that make no sense. 我无法告诉您,我的工作人员向我带来了使用该工具构建的查询的次数,并抱怨没有任何效果,而且我看到他们有多个错误的联接或没有意义的子查询。

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

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