zzz projects Entity Framework 6 EF 6
Home EF Core Articles Knowledge Base Online Examples
  • Home
  • EF Core
  • Articles
  • Knowledge Base
  • Online Examples

Entity Framework 6 - Knowledge Base (KB)

6 results in tag: interceptor

Intercept all EF6 Linq queries

I have a function which I want to run on every executed Linq query on a DbContext to modify the expression tree before execution. I've been having a look at the IDbCommandTreeInterceptor interface but that doesn't seem to provide an expression tree (whic...
entity-framework-6 expression-trees interceptor linq
asked by wizzardmr42

Getting DbContext from implementation of IDbCommandInterceptor

I am using an ...IDbCommandInterceptor... implementation:...public class MyInterceptor : IDbCommandInterceptor { public void ReaderExecuting(DbCommand command, DbCommandInterceptionContext<DbDataReader> interceptionContext) { var context =...
c# entity-framework entity-framework-6 interceptor
asked by bpiec

Learning Entity Framework 6 command tree interceptors

This is purely a learning experiment (yay science!). This is not meant to actually be used anywhere. I want to learn how EF6's command tree interceptors work....I'm trying to modify the intercepted command tree to add a "IsActive = 1" filter to all quer...
c# entity-framework entity-framework-6 interceptor
asked by Amy

Entity Framework Command Intercept change context connection string

Goal...: ...fall back to the backup database when the main one is not reachable / down....Current implementation...: ...when issue is detected, use class implementing ...IDbCommandInterceptor... to change connection string to fallback server....Close conn...
connection-string entity-framework-6 interceptor
asked by Levent

Hooking IDbInterceptor to EntityFramework DbContext only once

The ...IDbCommandInterceptor... interface is not very well documented. And I've only found a few scarce tutorials on it:...http://www.entityframeworktutorial.net/entityframework6/database-command-interception.aspx...https://msdn.microsoft.com/en-us/data/j...
c# entity-framework entity-framework-6 interceptor logging
asked by Aske B.

How can I add an interceptor to a single query in Entity Framework?

I have a query that I suspect is guilty of parameter-sniffing. I'd like to apply an interceptor like the one found ...here..., but I don't want any other queries affected....The code used there is: ...DbInterception.Add(new OptionRecompileHintDbCommandInt...
entity-framework entity-framework-6 interceptor
asked by adam0101

Page 1 of 1
  • 1

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Save your entities 20× faster with EF Extensions
SaveChanges vs BulkSaveChanges

EF Extensions
Try for free now
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!