Only add the date conversion if the type mapping is also a datetime

pull/151/head
Christopher Jolly 2 years ago
parent 01775d1b2f
commit ed50bb0dfa

@ -438,7 +438,7 @@ namespace EntityFrameworkCore.Jet.Query.Sql.Internal
protected override Expression VisitSqlParameter(SqlParameterExpression sqlParameterExpression)
{
if (sqlParameterExpression.Type == typeof(DateTime))
if (sqlParameterExpression.Type == typeof(DateTime) && sqlParameterExpression.TypeMapping is JetDateTimeTypeMapping)
{
Sql.Append("CDATE(");
base.VisitSqlParameter(sqlParameterExpression);

Loading…
Cancel
Save