Efcore: Issue with the interception of database operations in EF Core 3.1, cannot access IDbCommandInterceptor

Created on 4 Jan 2020  路  6Comments  路  Source: dotnet/efcore

I have installed EF Core 3.1 but when I try to use the IDbCommandInterceptor it's not available in the EF Core and asks me to install EntityFramework.

Here is a screenshot that includes a list of packages I have installed. When I try to implement IDbCommandInterceptor, it tells me that it's only available in EF.

ef-db-command-interceptor

closed-question customer-reported

Most helpful comment

@lamelyan

I was able to do a repo here.
MySql.Data.EntityFrameworkCore(8.0.18) Does Not Support EFCore 3.X

image

All 6 comments

@lamelyan

Use DbCommandInterceptor instead of IDbCommandInterceptor

I made a short article about it, it's in Portuguese, but I believe it will be easy for you.
http://ralms.net/dica/efcore31_operations_interception/

@ralmsdeveloper thank you for the quick reply. I tried to use DbCommandInterceptor and I get the same message.
ef-db-command-interceptor-2

More information:
https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.0/#interception-of-database-operations

@ajcvickers
Any particular reason for your reaction, is there anything else?

@lamelyan

I was able to do a repo here.
MySql.Data.EntityFrameworkCore(8.0.18) Does Not Support EFCore 3.X

image

@lamelyan Try the Pomelo MySQL provider. It supports EF Core 3.1.

Was this page helpful?
0 / 5 - 0 ratings