Booleans in Linq

Using a nullable Boolean (bool?) datatype in LINQ can cause some issues

You can return those values by using the nullable operator as shown below

  Transfer = e.Transfer ?? false

This will return the value from e.Transfer and if the value is null will return False

Comments

Popular posts from this blog

Linq Exclude from separate list

Sorting Ascending and Descending

Linq Query Syntax vs Method Syntax