koenbeuk / EntityFrameworkCore.Projectables

Project over properties and functions in your linq queries
MIT License
260 stars 17 forks source link

Unable to cast object of type 'EntityFrameworkCore.Projectables.Infrastructure.Internal.CustomQueryCompiler' to type 'Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler' when using Z.EntityFramework.Extensions and DeleteFromQuery #78

Closed P9avel closed 4 months ago

P9avel commented 11 months ago

Hi. I am calling DeleteFromQuery method from Z.EntityFramework.Extensions and now i am using yoour nuget. In result, i am get error Unable to cast object of type 'EntityFrameworkCore.Projectables.Infrastructure.Internal.CustomQueryCompiler' to type 'Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler'. Possible can you to inherited your CustomQueryCompiler from 'Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler?

koenbeuk commented 11 months ago

Yes that should be possible. Happy to accept a PR here.

A workaround would be to use limited compatibility mode as that replaces the IQueryTranslationPreprocessorFactory registration instead.

ByZhouhang commented 9 months ago

up EntityFrameworkCore.Projectables 2.3.0 to 3.0.x Causes EFCore.BulkExtensions batch update or delete error ,when i change EFCore.BulkExtensions to Z.EntityFramework.Extensions for batch update or delete ,have same problem,Do you have any plans to fix this recently? Thank you so much

P9avel commented 9 months ago

Hi, i am removed Z.EntityFramework.Extensions and using ExecuteUpdate from EF Core7.0 now

koenbeuk commented 4 months ago

Closing this as providing compatibility seems somewhat out of scope and there is a workaround available