Forgot the case of the parameter having NullTypeMapping. In that case go with adding the conversion

pull/151/head
Christopher Jolly 2 years ago
parent 6f31403f13
commit 331da3810e

@ -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);

Loading…
Cancel
Save