title: Exporting SQL data to Excel in ASP.net MVC
body: <p>I am trying to follow this demo (2nd method) to make sure it works before using it in a bigger project.</p>
  <p><a href="https://www.yogihosting.com/export-excel-asp-net-mvc/" rel="nofollow noreferrer">https://www.yogihosting.com/export-excel-asp-net-mvc/</a></p>
  <p>However I keep getting an error when retrieving my data at the following line below:</p>
  <p><code>DataSet dataSet = GetRecordsFromDatabase();</code></p>
  <p><code>System.Collections.Generic.List&lt;**********&gt;' to 'System.Data.DataSet</code></p>
  <p>I have a local SQL database connected to my project but I cannot seem to import the data as a DataSet type. Is it possible to hard code a mock Dataset locally for testing or is there an easier way to retrieve the data from my own local SQL server?</p>