Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generalize interceptors and add connection and transaction interception #16252

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

ajcvickers
Copy link
Member

Registration of interceptors is now command and moved to core:

protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder
        .UseSqlite("DataSource=Test.db")
        .AddInterceptors(new MyRelationalInterceptor(), new MyLoggingInterceptor());
}

Creating chains (essentially multi-dispatch) is handled automatically, with a mechanism for new interceptors to integrate with the functionality.

Also, added a lot of async paths that will be needed for new ADO.NET async methods. Part of #15917

Registration of interceptors is now command and moved to core:
```C#
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
    optionsBuilder
        .UseSqlite("DataSource=Test.db")
        .AddInterceptors(new MyRelationalInterceptor(), new MyLoggingInterceptor());
}

```

Creating chains (essentially multi-dispatch) is handled automatically, with a mechanism for new interceptors to integrate with the functionality.

Also, added a lot of async paths that will be needed for new ADO.NET async methods. Part of #15917
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants