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
Contributor

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

@ajcvickers ajcvickers requested a review from AndriySvyryd June 25, 2019 21:04
@ajcvickers ajcvickers force-pushed the RunningUpThatHill0621 branch from 291dda6 to e2b4666 Compare June 25, 2019 21:48
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
@ajcvickers ajcvickers force-pushed the RunningUpThatHill0621 branch from e2b4666 to 3619684 Compare June 26, 2019 22:16
@ajcvickers ajcvickers merged commit 9026770 into master Jun 26, 2019
@ghost ghost deleted the RunningUpThatHill0621 branch June 26, 2019 22:33
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