Page 1 of 1

Can't use the boolean literal 'false'

Posted: Wed 21 Jun 2017 13:08
by Wain123
I have a NUMBER(1) column mapped to a bool? property.
The following code throws a System.InvalidOperationException: 'The binary operator Equal is not defined for the types 'System.Nullable`1[System.Boolean]' and 'System.Boolean''

Code: Select all

ctx.Test.Where(z => z.Active == false).Count();
The following code works correctly:

Code: Select all

ctx.Test.Where(z => z.Active == true).Count();

Re: Can't use the boolean literal 'false'

Posted: Thu 29 Jun 2017 19:30
by Shalex
Thank you for your report. We will notify you when the issue is fixed.

Re: Can't use the boolean literal 'false'

Posted: Fri 04 Aug 2017 16:13
by Shalex
The bug with comparison and binary operations in EF Core is fixed: viewtopic.php?f=1&t=35777.