Ordering by nullable datetime column caused exception, because query was incorrectly translate into SQL query.
IIF(($it.DueDate == null), null, $it.DueDate) was transled as (DueDate IS NULL)NULLDueData in function Kros.KORM.Query.Sql.DefaultQuerySqlGenerator.VisitOrderBy
Steps To Reproduce
Set up one column as DateTime?
Order by this column
Expected behavior
IIF(($it.DueDate == null), null, $it.DueDate) will be transled as `IIF((DueDate IS NULL),NULL,DueData)
Actual behavior
Trown exception:
Microsoft.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword 'IS'.'
Library name and version
Description
Ordering by nullable datetime column caused exception, because query was incorrectly translate into SQL query.
IIF(($it.DueDate == null), null, $it.DueDate)
was transled as(DueDate IS NULL)NULLDueData
in functionKros.KORM.Query.Sql.DefaultQuerySqlGenerator.VisitOrderBy
Steps To Reproduce
Expected behavior
IIF(($it.DueDate == null), null, $it.DueDate)
will be transled as `IIF((DueDate IS NULL),NULL,DueData)Actual behavior
Trown exception: Microsoft.Data.SqlClient.SqlException: 'Incorrect syntax near the keyword 'IS'.'