How to select single record with Linq?
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
     

 

How to select single record with Linq?
===

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
     

 
