We currently throw a cryptic:
System.InvalidCastException: Unable to cast object of type 'System.Linq.Expressions.ConstantExpression' to type 'Microsoft.EntityFrameworkCore.Query.QueryParameterExpression'.
See #33674 for the original change in the EF.Constant/Parameter implementation that introduced the incompatibility with compiled queries; and #38150 for a recent report triggering this issue.
We currently throw a cryptic:
See #33674 for the original change in the EF.Constant/Parameter implementation that introduced the incompatibility with compiled queries; and #38150 for a recent report triggering this issue.