Closed nino-s closed 5 years ago
@AlexanderKrutov can you confirm this issue?
@nino-s Thank you for contributing! Sorry for late response. Your fix will be included in the nearest release.
@nino-s what DMBS are you using? SQL Server 2008-2017?
@VictorioBerra sry for the late response. Correct SQL Server 2017.
@nino-s IIRC, SQL Server by default all queries are case insensitive.
Note, this does not mean we should not fix the bug, I just wanted to point out that you should not have to set that option for columns if you are using SQL Server 2017.
Alright, thx for mentioning that :)
https://github.com/AlexanderKrutov/DataTables.Queryable/blob/master/DataTables.Queryable/QueryableExtensions.cs#L349
If the option
caseInsensitive
is set for columns, you do aToLower
call on the object string. If the object is null, both expressions which are build up on line 354 and 355 will callToLower
first. So you get a NullPointer before you check for not null.