After I updated my project to Version 7.2.114 of DevArt I recognized that some queries will not return results although the generated SQL is returning results if executed directly in TOAD. If I switch back to Version 7.0.25 everything works fine.
My database Customer-table looks like this:
SomeField | Firstname | CustomerNo
(null) | John | 12345
12345 | John | 12345
828282 | Mark | 12346
My query looks like this:
var firstNameToSearch = "John";
var someFieldToSearch = null;
var result = from customer in context.Customers
join someTable in context.SomeTables on customer.CustomerNo equals "12345"
where someTable.SomeCondition && (someTable.SomeField == someFieldToSearch || someFieldToSearch == null) && (customer.Firstname == firstNameToSearch || firstNameToSearch == null)
Now, when I execute the EF-query it will result in 0 records with no exception at all. But if I take the SQL-command it will result in 2 records.
If I change code in Line 2 to:
var someFieldToSearch = string.Empty;
it will return the right result.
I found an some hints pointing to this code:
Devart.Data.Oracle.Entity.OracleEntityProviderServices.HandleNullStringsAsEmptyStrings = true;
but it has no effects.