OrmLite does not transalate expressions correctly

I have the following query:

var q = db.From<MyTable>()
.Select(t => new 
{
    BooleanProp = t.IntField == null || t.BoolField == 1
});

OrmLite translates the expression literally, producing this:

(("MYTABLE"."INTFIELD" IS NULL) OR ("MYTABLE"."INTIELD" = 1))               AS BooleanProp

which returns Incorrect Syntax near keyword IS on SQL Server.

The error indicates SQL Server doesn’t support that expression.

OrmLite only translates C# Expressions to SQL Expressions for usage in conditional statements like expressions within WHERE and HAVING statements, if the RDBMS doesn’t support that expression in a SELECT statement it’s not supported but you can use Sql.Custom() to use a custom SQL Expression instead.