Skip to content

Commit 99a8d88

Browse files
committed
Revert "Do not convert simple constant to the SQL for projection."
This reverts commit 19ac65e.
1 parent 19ac65e commit 99a8d88

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
</ItemGroup>
101101

102102
<ItemGroup Label="Testing" Condition=" '$(TargetFramework)' == 'net462' ">
103-
<PackageVersion Include="System.Text.Json" Version="8.0.4" />
103+
<PackageVersion Include="System.Text.Json" Version="8.0.3" />
104104
</ItemGroup>
105105

106106
<ItemGroup Label="Benchmarks">

Source/LinqToDB/Linq/Builder/ExpressionBuilder.Expressions.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -805,14 +805,6 @@ bool HandleParameterized(Expression expr, [NotNullWhen(true)] out Expression? tr
805805
return false;
806806
}
807807

808-
// Do not select from database simple constants
809-
if (_flags.IsExpression()
810-
&& expr is ConstantExpression constantExpression
811-
&& (constantExpression.Value is null || constantExpression.Type.IsValueType))
812-
{
813-
return false;
814-
}
815-
816808
var canBeCompiled = Builder.CanBeCompiled(expr, false);
817809

818810
// some types has custom converter, we have to handle them

0 commit comments

Comments
 (0)