Is there an easy way to do this or do I just need to go through each record and insert it into whatever data structure I go with?
I need it in this format in order to pass it to a third party software called Aspose.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
DataSets are about DataTables; DataTables and DataViews are about DataRows. Linq queries are about objects.
If you want to execute a Linq2SQL query or Linq2Entities query and put the result into a collection of DataRows you will have to manually convert each instance of your query result to a DataRow type (and define the various DataColumns…).
The trivial solution of you question is using a LINQ query towards a DataTable… it will return a set of DataRows… but I don’t think this is the main point of you question.