jgauffin
jgauffin

Reputation: 101150

View all queries

I got a MVC3 application using Entity Framework 4 and SQL Server.

How can I view all queries that has been invoked (and the amount of time that they took)?

Upvotes: 1

Views: 115

Answers (2)

RubbleFord
RubbleFord

Reputation: 7636

Use the sql profiler, it will give you all this information and more. Won't require any code changes either.

Heres a link to a free one if you don't have the full toolset.

http://sites.google.com/site/sqlprofiler

Upvotes: 3

Ladislav Mrnka
Ladislav Mrnka

Reputation: 364299

You cannot without additional tools. Simply EF doesn't have such feature. The referenced article describes some tools (SQL profiler, DotTrace, EF Provider Wrappers, EFProf, Huagati profiler) but there are also:

Not every tool is free but those which are not have a trial version.

Upvotes: 1

Related Questions