i have this table
**ID CityCode Price**
1 ABB 100
2 CAB 160
3 CAB 340
4 TRE 800
5 ABB 770
6 TRE 900
7 ABB 500
I want write down a query(linq) which will return the following result as show the code below
CityCode
ABB
CAB
TRE
i want select a list with only the CityCode without duplicate record, How can i do it with linq to sql ?
Thanks so much for your attention,
have a good time,
Cheers
It sounds like you want
Distinct()That’s not the same as retrieving a single record (as per your title) though. If this isn’t what you’re after, please give us more information.