IQueryable to DataSet
I have seen numerous methods and tricks around the net today. What i need is convert my Linq to SQL queries (IQueryable results) into a DataSet for reporting purposes. Reporting tool is XtraReports from DevExpress.
A promising solution i found in another post is modelshredder. I am still concern though about the whole object graph, what about if i need all the hierarchical data for my report, the related association data EntitySet, EntityRef (e.g. i have loaded with Customers all the Orders and OrderDetails). Is there something supporting this to convert it in the appropriate DataSet with the related DataTables and all the data i need for generating my report with numerous values from numerous DataTables? I understand i could use the previous tool and convert one by one the related data to DataTables inside the DataSe开发者_C百科t and give the DataSource in the Report.
[EDIT] DataContext.GetCommand(IQueryable) looks another usefull solution.
I am looking for more views on the subject and listening to whoever used Linq to SQL and XtraReports (or any report tool asking for IList, IBindingList, ITypedList datasource) to do the job.
There is the best solution in official site of DevExpress
精彩评论