mattwar/iqtoolkit

Distinct/Case combination

Closed this issue · 1 comments

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

Thanks for the report. I've fixed this in the current source.