Ok, I poked around before posting and can't seem to find anything... so here we go.
I decided that returning datasets, working with datasets and datatables in a front end app is a rather bad idea. So with the magic of generics I am returning a generic list via Webservice call ( not WCF just plain ol' asmx ) . That works dandy as long as you need to return one list per call to your webservice.
The scenario I am running into is that I have a more involved screen where there are a few dropdowns and so on. I need to bind those dropdowns to a generic list. Problem is that I don't want to make several web calls, one for each dropdown, to get my data. In the past I would have just returned a dataset and bound a dropdown to a specific table in the dataset.
So, it would be super to return multiple generic lists in one web call.
Things I've tried:
- Using a List of Lists
- Using a Collection of generic Lists
- Creating a base class and using a Collection of List<Base> , there are conversion issues there when trying to stuff objects into that List<Base>.
- Creating a class that has properties that return List<MyOneObject> , List<MySecondObject> .. etc. That works but it's kinda messy... I have lots of classes and screens in the app where this would happen. I could create a class like this that has a properties of List for each class, but like I said I think that may get out of control.
So at this point I have two options, #4 in the above list, or just return a dataset which I would prefer not to do :0) Has anyone run into this before ?