Created
May 20, 2015 08:08
-
-
Save cmatskas/44606c96b6ee24ea25ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//1. Application start up | |
protected void Application_Start() | |
{ | |
// other code ommitted | |
DbInterception.Add(new YourInterceptor()); | |
} | |
//2. DbConfiguration | |
public class YourDBContextConfiguration : DbConfiguration | |
{ | |
public YourContextDbConfiguration() | |
{ | |
DbInterception.Add(new YourInterceptor()); | |
} | |
} | |
//3. Anywhere in your code, just call | |
DbInterception.Add(new YourInterceptor()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment