Skip to content

Commit 9d635b3

Browse files
committed
Translate DateTime.Date without type mapping in legacy mode (#3032)
Fixes #3031 (cherry picked from commit 10aebeb)
1 parent fa8c94c commit 9d635b3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/EFCore.PG/Query/ExpressionTranslators/Internal/NpgsqlDateTimeMemberTranslator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public NpgsqlDateTimeMemberTranslator(
7272
switch (instance?.TypeMapping)
7373
{
7474
case NpgsqlTimestampTypeMapping:
75-
case NpgsqlTimestampTzTypeMapping when NpgsqlTypeMappingSource.LegacyTimestampBehavior:
75+
case { } when NpgsqlTypeMappingSource.LegacyTimestampBehavior:
7676
return _sqlExpressionFactory.Function(
7777
"date_trunc",
7878
new[] { _sqlExpressionFactory.Constant("day"), instance! },
@@ -225,4 +225,4 @@ private SqlExpression GetDatePartExpression(
225225

226226
_ => null
227227
};
228-
}
228+
}

0 commit comments

Comments
 (0)