DISTINCT with 2.0

Posts   
 
    
daz_oldham avatar
daz_oldham
User
Posts: 62
Joined: 20-Jul-2007
# Posted on: 10-Oct-2007 19:26:07   

Hello

I've been having a good read through the forums, and I've looked through the manual - but what I can't find is an easy way of doing distinct selections.

All I've found is the way of using projections which seems to involve around 25 lines of code...

What I would like to do is look up some distinct values in one table and join it to another table so that when I bind to my listbox, I can have the value as TableB.ForeignKey and the text value as TableA.Name.

Is the projection method the only way?

Many thanks

Darren

jmeckley
User
Posts: 403
Joined: 05-Jul-2006
# Posted on: 10-Oct-2007 20:50:25   

by defination entities are unique so distinct is irrelevant. to use the key word query you need to fetch a projection, typed/dynamic list.

daz_oldham avatar
daz_oldham
User
Posts: 62
Joined: 20-Jul-2007
# Posted on: 11-Oct-2007 16:42:45   

thanks jmeckley