title: LINQ to SQL - How to select specific columns and return strongly typed list
body: <p>I'm trying to use LINQ to SQL to select a few specific columns from a table and return the result as a strongly typed list of objects. </p>
  
  <p>For Example:</p>
  
  <pre><code>var result = (from a in DataContext.Persons
                                where a.Age &gt; 18
                                select new Person
                                {
                                    Name = a.Name,
                                    Age = a.Age
                                }
                                ).ToList();
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>It builds fine, but when I run it, I get the error. Explicit construction of entity type <code>MyEntity</code> in query is not allowed.</p>