I am trying to write a module to add a comment containing useful information to each Linq2Entities
SQL query emitted by the DbContext
entity DbContext
(the information will be used during debugging).
Using Linq2Sql
, I previously did this by expanding the MvcMiniProfiler ProfiledDbCommand
command class. However, I cannot use the same approach for working with EF / DbContext. I am extending EFProfiledDbCommand
, but this does not work. In fact, even the direct use of EFProfiledDbCommand
does not work: I get an error
Unable to determine the provider name for the connection of type 'MvcMiniProfiler.Data.EFProfiledDbConnection'.
Can someone provide a workaround for my current solution or an alternative approach to this problem?
source share