diff --git a/Source/LinqToDB.EntityFrameworkCore/EFCoreMetadataReader.cs b/Source/LinqToDB.EntityFrameworkCore/EFCoreMetadataReader.cs index 253056b..c5f290c 100644 --- a/Source/LinqToDB.EntityFrameworkCore/EFCoreMetadataReader.cs +++ b/Source/LinqToDB.EntityFrameworkCore/EFCoreMetadataReader.cs @@ -657,10 +657,11 @@ string PrepareExpressionText(Expression? expr) return text; } - // https://github.com/npgsql/efcore.pg/blob/main/src/EFCore.PG/Query/Expressions/Internal/PostgresBinaryExpression.cs - if (newExpression.GetType().Name == "PostgresBinaryExpression") + // https://github.com/npgsql/efcore.pg/blob/main/src/EFCore.PG/Query/Expressions/Internal/PgBinaryExpression.cs + // renamed in 8.0.0 + if (newExpression.GetType().Name == "PgBinaryExpression") { - // Handling Npgsql PostgresBinaryExpression + // Handling Npgsql PgBinaryExpression var left = (Expression)newExpression.GetType().GetProperty("Left")!.GetValue(newExpression)!; var right = (Expression)newExpression.GetType().GetProperty("Right")!.GetValue(newExpression)!; @@ -699,7 +700,7 @@ string PrepareExpressionText(Expression? expr) "JsonExistsAny" => "?|", "JsonExistsAll" => "?&", _ => throw new InvalidOperationException( - $"Unknown PostgresBinaryExpression.OperatorType: '{operand}'") + $"Unknown PgBinaryExpression.OperatorType: '{operand}'") }; switch (operand)