title: How to perform LINQ To SQL for Database in Windows Phone
body: <p>Say, I have the following tables in SQLCe Database:</p>
  
  <pre>
  Table Country               Table Cities
  -----------                 -------------       
  
  Pkey  countryname           Pkey Fkey  cityname
  1.    USA                   1.   1.    LA
  2.    Canada                2.   2.    Toronto
                              3.   1.    NYC
                              4.   1.    Chicago
  </pre>
  
  <p>Here the code to get the cities:</p>
  
  <pre>
  public IList GetCities(){  
  
  IList cityList = null;    
  using (CountryDataContext context = new CountryDataContext(ConnectionString))    
  {        
  
  IQueryable query = from c in context.Cities select c;        
  cityList = query.ToList();    
  
  }     
  return cityList;
  
  }
  </pre>
  
  <p>Questions are :</p>
  
  <ol>
  <li><p>How do I select using normal Select-statement :  Select cityname where country = USA?</p></li>
  <li><p>How do I select the country and get the primary key ?
  Select ID, Countryname</p>
  
  <p>then, I can pass the Pkey and do a select again</p>
  
  <p>Select cityname where Fkey = "1";</p></li>
  </ol>
  
  <p>would apreciate any help or sample on LinqToSQL for normal Databse operation.</p>
  
  <p>Thanks</p>