From f16328984e1d514a846b7ccd5c52b367b1f50337 Mon Sep 17 00:00:00 2001 From: Shay Rojansky Date: Fri, 20 Dec 2024 11:06:44 +0100 Subject: [PATCH] Fix SqlConstantExpression obsolete constructor (#35357) Fixes #35355 --- .../Query/SqlExpressions/SqlConstantExpression.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EFCore.Relational/Query/SqlExpressions/SqlConstantExpression.cs b/src/EFCore.Relational/Query/SqlExpressions/SqlConstantExpression.cs index c386b7c98e2..9e78e08d52b 100644 --- a/src/EFCore.Relational/Query/SqlExpressions/SqlConstantExpression.cs +++ b/src/EFCore.Relational/Query/SqlExpressions/SqlConstantExpression.cs @@ -45,7 +45,7 @@ public SqlConstantExpression(object value, RelationalTypeMapping? typeMapping) /// The associated with the expression. [Obsolete("Call the constructor accepting a value (and possibly a Type) instead")] public SqlConstantExpression(ConstantExpression constantExpression, RelationalTypeMapping? typeMapping) - : base(constantExpression.Type.UnwrapNullableType(), typeMapping) + : this(constantExpression.Value, constantExpression.Type, typeMapping) { }