From 331da3810ef4300c099cbcd77d798431e89f90da Mon Sep 17 00:00:00 2001 From: Christopher Jolly Date: Wed, 11 Oct 2023 01:47:14 +0800 Subject: [PATCH] Forgot the case of the parameter having NullTypeMapping. In that case go with adding the conversion --- src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs b/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs index 44949d6..9c33a79 100644 --- a/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs +++ b/src/EFCore.Jet/Query/Sql/Internal/JetQuerySqlGenerator.cs @@ -438,7 +438,7 @@ namespace EntityFrameworkCore.Jet.Query.Sql.Internal protected override Expression VisitSqlParameter(SqlParameterExpression sqlParameterExpression) { - if (sqlParameterExpression.Type == typeof(DateTime) && sqlParameterExpression.TypeMapping is JetDateTimeTypeMapping) + if (sqlParameterExpression.Type == typeof(DateTime) && sqlParameterExpression.TypeMapping is JetDateTimeTypeMapping or NullTypeMapping) { Sql.Append("CDATE("); base.VisitSqlParameter(sqlParameterExpression);