DataTable "gotcha"
Our original plan was to make two different calls to the web service for the databinding of the list boxes in Chapter 12, and passing back the lists as a DataTable to the client. The beauty of WCF services is that they can accept and return a wide variety of serializable objects. At the time of writing, DataTables have been made serializable but are not yet working through WCF, though DataSets are. This is why we opted to package the DataTables into a DataSet and pass it back to the client.
There are advantages and disadvantages to doing it this way. There are two major advantages to this:
We need to give only one call to the client with only one returned object to use
Client application speed is greater with only one call
The disadvantage to this is that the total size of a DataSet with one DataTable is much bigger than the size of just the DataTable itself. The increased size could take longer to transfer and also use more bandwidth. Our example is a very small set of...