Hello,
every time i try to use ExecuteDeleteAsync in EF7 , for example context.TABLE_NAME.Where(x => x.ID == id).ExecuteDeleteAsync(cancellationToken: cancellationToken) i get error like :
- System.InvalidCastException: Unable to cast object of type 'Microsoft.EntityFrameworkCore.Query.SqlExpressions.DeleteExpression' to type 'Microsoft.EntityFrameworkCore.Query.SqlExpressions.SelectExpression'. at Devart.Data.Oracle.Entity.g.Optimize(Expression selectExpression, IReadOnlyDictionary`2 parametersValues, Boolean& canCache) at Microsoft.EntityFrameworkCore.Query.Internal.RelationalCommandCache.GetRelationalCommandTemplate(IReadOnlyDictionary`2 parameters) at Microsoft.EntityFrameworkCore.Internal.RelationCommandCacheExtensions.RentAndPopulateRelationalCommand(RelationalCommandCache relationalCommandCache, RelationalQueryContext queryContext) at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.<>c.<NonQueryResultAsync>b__14_0(DbContext _, ValueTuple`3 state, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.NonRetryingExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.RelationalShapedQueryCompilingExpressionVisitor.NonQueryResultAsync(RelationalQueryContext relationalQueryContext, RelationalCommandCache relationalCommandCache, Type contextType, CommandSource commandSource, Boolean threadSafetyChecksEnabled) at lambda_method446(Closure, QueryContext) at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.ExecuteAsync[TResult](Expression query, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.EntityQueryProvider.ExecuteAsync[TResult](Expression expression, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.RelationalQueryableExtensions.ExecuteDeleteAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)