查看EF4生成的查询? [英] View EF4 generated queries?

查看:137
本文介绍了查看EF4生成的查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我找不到相应的代码,LINQ to SQL有几种方法,包括可视化加载项,可以从IQueryable中查看生成的SQL。对于实体框架4. StackOverflow没有任何东西,没有博客。如何做?



最好,我希望能够在代码中执行,而无需实际执行查询才能看到它。



谢谢!

解决方案

有几种方法来查看sql。 / p>

免费


  1. 在ObjectQuery上.ToTraceString()将显示你为查询生成sql。

  2. 下载其中一个EF团队成员编写的ef跟踪提供程序。 E <。。。 aspxrel =nofollow> F跟踪提供者

  3. Linq To实体可视化器,您可以下载 here

  4. LinqPad

  5. Sqlserver profiler

商业


  1. Efprof。 com


LINQ-to-SQL had several ways, including a visualizer add-in, to view the generated SQL from an IQueryable.

I can't find the equivalent for Entity Framework 4. Nothing on StackOverflow, no blogs. How is it done?

Preferably, I'd like to be able to do it in code and without having to actually execute the query just to see it.

Thanks!

解决方案

there are several approaches to looking at the sql.

Free

  1. On the ObjectQuery do .ToTraceString() that will show u the sql generated for the query.
  2. Download ef tracing provider written by one of the EF team members. EF Tracing Provider
  3. Linq To Entities visualizer which you can download here.
  4. LinqPad
  5. Sqlserver profiler

Commercial

  1. Efprof.com

这篇关于查看EF4生成的查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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