tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Logging and caching queries in EF

14 Jun 2009 .NET, Entity Framework, Firebird, LINQ

Jarek Kowalski posted to MSDN Code Gallery wrappers for any ADO.NET Entity Framework provider with ability to do caching and logging.

For me especially the logging (EFTracingProvider) is interesting, as I’m always checking queries sent to database. For selects it’s plausible with ToTraceString method (but not with i.e. query.First()), but looking for CUD is not so easy. With EF provider for Firebird, you can check, by default, Output window of Visual Studio, where all queries are placed or use any listener to write these i.e. to the file (this logging is only in debug builds of FirebirdClient).

I was thinking about creating some wrapped provider, but this is better (and without work 😉).

Profile Picture Jiří Činčura is an independent developer focusing on data and business layers, language constructs, parallelism and databases. Specifically Entity Framework, asynchronous and parallel programming, cloud and Azure. He's Microsoft Most Valuable Professional and you can read his articles, guides, tips and tricks at