Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to profile Entity Framework activity against SQL Server?

It's easy to use SQL Server Profiler to trace stored procedures activity. But how to trace SQL queries issued by LINQ via Entity Framework? I need to identify such queries (LINQ code) that consume a lot of time, are called most frequently and therefore are the first candidates for optimization.

like image 931
Vlad Novakovsky Avatar asked Jul 25 '26 15:07

Vlad Novakovsky


1 Answers

Add this key to your connection string:

Application Name=EntityFramework

And filter by this in Profiler

like image 54
ErikEJ Avatar answered Jul 28 '26 15:07

ErikEJ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!