linq2db.EntityFrameworkCore icon indicating copy to clipboard operation
linq2db.EntityFrameworkCore copied to clipboard

Make it possible to define default interceptors for ToLinqToDB() IQueryable extension

Open plukawski opened this issue 3 years ago • 0 comments

Good day, Since the 4.0 version of Linq2Db we are no longer able to use Command Processors (they were refactored and now we must use the newly created Interceptors). The issue with current approach is that Interceptors cannot be defined globally (the old Command Processors could). As a reason there is no clean way to define default interceptors that would be used by ToLinqToDB parameter less extension.

To workaround that issue I have created a decorator for the default ILinqToDBForEFTools implementation in my code and in the TransformExpression method override I am adding interceptors to DataContext object if they were not added already. This works but I think this is far from a clean solution to do such things.

plukawski avatar Sep 09 '22 07:09 plukawski