Question

I am developing a custom Content Management System in C# (SQL Server 2005) for my organization that operates primarily on Entity Framework 4.1. I would like some insight as to how my application is running, specifically when it comes to my EF queries.

What I'm looking for is a way to monitor the quantity, speed and actual execution (translated SQL) of queries being executed within a given period of time. Essentially I'd like to add DB profiling functionality into my application.

If at all possible I would to do this without implementing custom monitoring code for each one of my repository functions.

My question is this:
What is the simplest way to monitor in/out performance of the Entity Framework queries. I would like the following data:

  1. A list of queries executed within the profiling time-span
  2. For each query I would like to see execution time and actual SQL
  3. If possible, the result size for each query would be helpful too
Was it helpful?

Solution

You can use an existing tool, such as the Hibernating Rhinos EF Profiler.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top