title: Linq to Entities to return an int list from an nvarchar field
body: <p>I am using C#, Linq to Entities and .Net 4</p>
  
  <p>I am using the following code to extract a list of data. The data may be a number but for some records it may be null or some other form of data. Is it possible with Linq to extract just the numbers in this filed or do I need to use additional steps?</p>
  
  <pre><code>var s = (from t in context.Cards where t.CardData != null select t.CardData).ToList();
  </code></pre>
  
  <p>The above will return a list of strings but I’d like a list of int. The CardData field may be null, a number or some text. In the DB it is a nullable nvarchar field.</p>