When dealing with convert, if we don't have a specific conversion function, try just send the original operand and let Jet work with the types. Seems to be fairly lenient

pull/137/head
Christopher Jolly 3 years ago
parent 6cb1748237
commit 306585af13

@ -362,12 +362,12 @@ namespace EntityFrameworkCore.Jet.Query.Sql.Internal
return convertExpression;
}
if (typeMapping.ClrType.IsEnum)
{
Visit(convertExpression.Operand);
return convertExpression;
}
throw new InvalidOperationException($"Cannot cast to CLR type '{typeMapping.ClrType.Name}' with Jet.");
//Just pass the operand in the default case
//If we have a type mapping on the operand, then it seems to work fine
//Jet appears to be fairly flexible when types aren't specifically mentioned
//Keep an eye on this for any further problems - doesn't show anything in the tests right now
Visit(convertExpression.Operand);
return convertExpression;
}
/// <summary>

Loading…
Cancel
Save