title: Convert DataTable to IEnumerable<T> in ASP.NET Core 2.0
body: <p>I need to generate an 'IEnumerable from a DataTable that I receive as an input from another system.  The following code worked in ASP.NET 4.6.1.  </p>
  
  <pre><code>public static IEnumerable&lt;UserAssignmentDto&gt; StaffAssignmentsUsingStoredProcedure(System.Data.DataTable dataTable)
      {
          var data = dataTable.AsEnumerable().Select(row =&gt;
              new UserAssignmentDto
              {
                  Id = ((string)row["AssignmentNumber"]),
                  Position = (string) row["EsrPositionTitle"],
  
              });
  
          return data;
      }
  </code></pre>
  
  <p>However, 'DataTable' no longer contains a definition for 'AsEnumerable' in ASP.NET Core 2.0.  </p>
  
  <p>What would be the most efficient way to generate the 'IEnumerable' that I need?</p>