Importing a .CSV using SqlBulkCopy With ASP.Net Core
<p>Hi I am trying to migrate some projects to ASP.Net Core and having some issues with what is the correct way to upload a .CSV file to my SQL database.</p>

<p>In the past I would upload the .CSV file loop through it and store that information in a DataTable and then simply do a SqlBulkCopy.WriteToServer but I have found out that currently there is not a DataTable object in .Net Core.  SQLBulkCopy accepts a DbDataReader instead of a DataTable. </p>

<p>What is the best method to get this to work.  I have the file uploaded and I can work with the contents I just need to get the data in the proper format to do an upload to my SQL database.</p>

<p>Open to any ideas.  Thanks.</p>