You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following query: context.Items.OrderBy(x => x.IsActive);
..returns items with IsActive == true first then those with IsActive == false (should be the opposite).
Similarily, the following query: context.Items.OrderByDescending(x => x.IsActive);
..returns items with IsActive == false first then those with IsActive == true (should be the other way around).
This seems to be a bug in JetEntityFrameworkProvider because it works the right way with SQL Server and, of course, with any other collection. As a workaround, I'm currently using context.Items.ToList().OrderBy....
The text was updated successfully, but these errors were encountered:
@jeremy-morren I do know that a "Yes/No" field in Access is represented as 0 or -1 value. However, since it's mapped by EF as a .NET Boolean type, it should be consistent with the Boolean type of the .NET Framework. EF is an ORM after all and works as a separation layer, therefore, it should (and it does) handle such conflicts behind the scenes (one example off the top of my head is that EF translates null to DBNull and vice-versa).
The following query:
context.Items.OrderBy(x => x.IsActive);
..returns items with
IsActive == true
first then those withIsActive == false
(should be the opposite).Similarily, the following query:
context.Items.OrderByDescending(x => x.IsActive);
..returns items with
IsActive == false
first then those withIsActive == true
(should be the other way around).This seems to be a bug in JetEntityFrameworkProvider because it works the right way with SQL Server and, of course, with any other collection. As a workaround, I'm currently using
context.Items.ToList().OrderBy...
.The text was updated successfully, but these errors were encountered: