Reading this question (and answer) I found out that there are at least two ways of get distinct items off an IQueryabe
while still getting to choose what to filter by. Those two methods being:
table.GroupBy(x => x.field).Select(x => x.FirstOrDefault());
or using MoreLinqs DistinctBy
table.DistinctBy(x => x.field);
But that thread doesn't explain the performance difference and when I should use the one over the other. So when do I want to use one over the other?