IMultipleResults: how do I handle multiple result sets from a stored procedure when they are not type mapped?

This post on SO answers most of the questions I have (thanks to Pure.Krome for the thorough answer) on how to build a query that returns multiple results.However, in the case where I work with returning tables it depends on how the process behaves. Can't change proc. The results returned are a set of data that does not map to types at all (for example, the first table is a target from the parts of the Customers table and the Orders table, the second table, if present, will debug the output, then there might be a third table, etc.) ).

Should I be doing this as dataset / datadapter, etc.? Or is this possible with LINQ?

+1


a source to share


1 answer


LINQ is an ORM (albeit quite simple), with "O" being (importantly) an "object". If you cannot predict the layout of the object returned in each grid, then it is not suitable for ORM.



Personally, I wouldn't go from LINQ to DataTable

(but maybe I'm just addicted to DataTable

; -p) - I would use SqlCommand.ExecuteReader

and do my own object mapping (etc.). But maybe it can save time to just use DataSet

... YMMV etc.

+1


a source







All Articles