I don’t know exactly how EfProf works internally, but EF expands as custom providers - with the help of a custom provider you can wrap an existing provider (i.e. SQL Server) and check all traffic - this allows you to profile. This article focuses on this topic: Tracing and caching vendor wrappers for the Entity platform - it provides sample code.
Whenever you issue a LINQ or Entity SQL query through an ObjectContext, the instance of the query goes through a series of layers (see the figure below). At a high level, we can say that all requests and updates from ObjectContext are translated and executed through EntityConnection, which, in turn, is a data provider for a specific server, such as SqlClient Client or Sql Server CE.
, Entity , Entity Framework .
- , :
, , ,
