title: AutoMapper version 5 mapping IDataReader
body: <p>I'm trying to map from IDataReader into Person but I always get 0 results:
  <a href="https://github.com/AutoMapper/AutoMapper/issues/874" rel="nofollow">https://github.com/AutoMapper/AutoMapper/issues/874</a></p>
  
  <p>Profile:</p>
  
  <pre><code>internal class ImportAddressProfile : Profile
  {
      private readonly IContainer _container;
  
      public ImportAddressProfile(IContainer container)
      {
          _container = container;
  
          CreateMap&lt;IDataReader, Person&gt;();
         CreateMap&lt;IDataReader, List&lt;Person&gt;&gt;();
      }
  }
  
  public class Person
  {
      public string FirstName { get; set; }
      public int Amount { get; set; }
  }
  </code></pre>
  
  <p>Run:
  ...</p>
  
  <pre><code>var dt = new DataTable();
  dt.Columns.Add("FirstName", typeof(string));
  dt.Columns.Add("Amount", typeof(int));
  dt.Rows.Add("John", 123);
  dt.Rows.Add("Bob", 2);
  
  IDataReader reader = dt.CreateDataReader();
  List&lt;Person&gt; People = Mapper.Map&lt;IDataReader, List&lt;Person&gt;&gt;(reader);
  
  // returns zero results
  </code></pre>
  
  <p>I've already tried adding nuget package: <a href="https://www.nuget.org/packages/automapper.data" rel="nofollow">https://www.nuget.org/packages/automapper.data</a></p>