title: c# Linq `List<Interface>.AddRange` Method Not Working
body: <p>I have an interface defined as below:</p>
  
  <pre><code>public interface TestInterface{
      int id { get; set; }
  }
  </code></pre>
  
  <p>And two Linq-to-SQL classes implementing that interface:</p>
  
  <pre><code>public class tblTestA : TestInterface{
      public int id { get; set; }
  }
  
  public class tblTestB : TestInterface{
      public int id { get; set; }
  }
  </code></pre>
  
  <p>I have IEnumerable lists a and b populated by the database records from tblTestA and tblTestB</p>
  
  <pre><code>IEnumerable&lt;tblTestA&gt; a = db.tblTestAs.AsEnumerable();
  IEnumerable&lt;tblTestB&gt; b = db.tblTestBs.AsEnumerable();
  </code></pre>
  
  <p>However, the following is not permitted:</p>
  
  <pre><code>List&lt;TestInterface&gt; list = new List&lt;TestInterface&gt;();
  list.AddRange(a);
  list.AddRange(b);
  </code></pre>
  
  <p>I have to do as follows:</p>
  
  <pre><code>foreach(tblTestA item in a)
      list.Add(item)
  
  foreach(tblTestB item in b)
      list.Add(item)
  </code></pre>
  
  <p>Is there something I am doing wrong? Thanks for any help</p>