Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sql trace using Entity Framework 4.1 against SQL Server CE 4

Without using an external tracer such as SQL Profiler or EF Profiler. Is there a way of tracing the SQL for the statement below using EF 4.1 against an SQL Server CE database?

int count = context.Customers.Count();
like image 452
Darren Lewis Avatar asked Nov 13 '22 17:11

Darren Lewis


1 Answers

Though each supported database back end typically supplies its own tracing methods, Entity Framework actually has its own built in tracing routines, the use of which depends a bit upon whether you're using Code First or not. I refer you to the following SO question for further details:

Entity Framework 4.1 - EFTracingProvider

like image 186
Phileosophos Avatar answered Mar 06 '23 14:03

Phileosophos