Skip to content

Commit 2cc66b7

Browse files
Merge pull request #4 from AlanLaiTw/master
#4 Null issue when calling .ToString() method
2 parents bc53579 + f98ba9d commit 2cc66b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/jQueryDatatableServerSideNetCore22/Extensions/LinqExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static IQueryable<T> WhereDynamic<T>(
4040

4141
//Expression
4242
sourceList = sourceList.Where(c =>
43-
properties.Any(p => p.GetValue(c).ToString()
43+
properties.Any(p => p.GetValue(c) != null && p.GetValue(c).ToString()
4444
.Contains(query, StringComparison.InvariantCultureIgnoreCase)));
4545
}
4646
catch (Exception e)

0 commit comments

Comments
 (0)