title: Convert Linq Data query to object type
body: <p>I'm getting the error </p>
  
  <blockquote>
    <p>"Unable to cast object of type
    'System.Data.Linq.DataQuery`1[StockManagement.Models.Client]' to type
    'StockManagement.Models.Client'."</p>
  </blockquote>
  
  <pre><code>public class Client
          {
              public int ClientID { get; set; }
              public string Name { get; set; }
              public string Address { get; set; }
              public string Mobile { get; set; }
              public string Telephone { get; set; }
              public string Fax { get; set; }
              public string Company { get; set; }
          }
  
  
  private StockDataClassesDataContext dc;
   public Client GetClient(int clientID)
          {
              dc = new StockDataClassesDataContext(ConString.DBConnection);
              Client query = (Client)(from tbclient in dc.tblClients
                                    where tbclient.ClientID == clientID
                                    select new Client
                                    {
                                        Address = tbclient.Address,
                                        ClientID = tbclient.ClientID,
                                        Company = tbclient.Company,
                                        Fax = tbclient.Fax,
                                        Mobile = tbclient.Mobile,
                                        Name = tbclient.Name,
                                        Telephone = tbclient.Telephone
                                    });
              return query;
          }
  </code></pre>