.net - How do I return multiple generic Lists in one Web Call? -
I have decided that returning datasets and datasets working with DATETs back to a front end app is a bad idea . So with the generic magic I am returning a general list via website call (WCF not just plain ol 'ASMX). This works until you need to return a list per call on your phone service.
The scenario I am running is that I have a more screen involved where there are some dropdowns and so on. I need to force those dropdowns into a generic list. The problem is that I do not want to make multiple web calls, one for each dropdown, to get my data. In the past, I just returned a dataset and had a dropdown in a specific table in the dataset.
Therefore, it would be super to back up many generic lists in a web call.
I have tried:
- Using the list of lists
- Using the collection of general listings
- Support Class and
list
In order to try things for goods, there are conversion issues,; Base & gt; list & lt; Base & gt; Using
. - Creating a class whose properties are
list & lt; MyOneObject & gt;
,list & lt; MySecondObject & gt;
, etc. It works but it is a bit messy ... I have many classes and screens in the app where it will be I can create a class like this in whichlist for each category & lt; MyType & gt;
have properties, but as I said I think that can be out of control.
At this point I have two options, return # 4 to the above list, or just return a dataset I would not like to do: 0)
Have worked on this?
Well, I do not think it is a good idea to return many lists, but if you are going to do this , Then I
do something like
class wrapper {public list & lt; Object1 & gt; Create a wrapper class with each list highlighted as. {1 Receive Object List; Set;} public list & lt; Object1 & gt; Object2List {get; Set;}}
Comments
Post a Comment