title: Why EF code is not selecting a single column?
body: <p>I have used this to pick just a single column from the collection but it doesn't and throws casting error.</p>
  
  <pre><code>ClientsDAL ClientsDAL = new DAL.ClientsDAL();
  var clientsCollection= ClientsDAL.GetClientsCollection();
  var projectNum = clientsCollection.Where(p =&gt; p.ID == edit.Clients_ID).Select(p =&gt; p.ProjectNo).ToString();
  </code></pre>
  
  <p>Method:</p>
  
  <pre><code>public IEnumerable&lt;Clients&gt; GetClientsCollection(string name = "")
  {
      IEnumerable&lt;Clients&gt; ClientsCollection;
      var query = uow.ClientsRepository.GetQueryable().AsQueryable();
      if (!string.IsNullOrEmpty(name))
      {
          query = query.Where(x =&gt; x.Name.Contains(name));
      }
  
      ClientsCollection = (IEnumerable&lt;Clients&gt;)query;
      return ClientsCollection;
  }
  </code></pre>