tags:

views:

71

answers:

1

This post on SO answers most of the questions I have (much thanks to Pure.Krome for the thorough response) about how to build a query that returns multiple results. However, in the case that I'm working with my tables that are coming back are sort of dependent on how the proc behaves. Can't change the proc. The results that are coming back are a set of datatables that don't map to types at all (for example, the first table is a mish mash of parts of the Customers table and the Orders table, the second table, if present, will be debugging output, then there might be a third table and so on).

Do I have to do this as a dataset/datadapter etc? Or is this possible with LINQ?

+1  A: 

LINQ is an ORM (albeit a fairly simple one), with the "O" being (importantly) "object". If you can't predict the layout of the object returned in each grid, then it isn't a good fit for ORM.

Personally I wouldn't jump from LINQ to DataTable (but maybe I'm just biased against DataTable ;-p) - I would use SqlCommand.ExecuteReader and do my own object (etc) mapping. But maybe it might save time to just use a DataSet... YMMV etc.

Marc Gravell
Yep, that's pretty much what I concluded. I was a little too attached to keeping my testing project all in one flavor of DAL and didn't want to mix and match. But in the end, no harm done: I added a call to fill a dataset.
jcollum