markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 303 forks source link

The distinct clause does not works with InMemoryAdapter #350

Open JorgeGamba opened 9 years ago

JorgeGamba commented 9 years ago

When you add a .Distinct() clause to a SimpleQuery like

var records = db.Test.All().Select(db.Test.Name).Distinct().ToList();

It simply has no effect.

Timothep commented 9 years ago

If I remember correctly, the Distinct clause should be applied to the "db.test.name", not to the query as a whole:

db.test.all().select(db.test.name.distinct()).tolist();