Distinct/Case combination
Closed this issue · 1 comments
MarkusTischendorf commented
Hi,
i think a combination of Distinct and a case expression is not working like expected.
Example:
var query = db.Customers.Select(r => r.CustomerID == "ALFKI" ? 1 : 0).Distinct();
var test = query.ToList();
Assert.Equal(2, test.Count());
The sql query includes the column CustomerID and the case is evaluated locally.
This results in more than 2 rows.
Thanks...
Markus
mattwar commented
Thanks for the report. I've fixed this in the current source.