Web service / wcf, is it better to return a dataset?

So, from what I saw about services, user objects seem to be a way of transition when a service is written to return data. If I write a service that will be used to 1) populate the database or 2) provide information for the website, is it always used to return a dataset / data, rather than a list of user objects with all this information?

thanks

+5
source share
7 answers

I think the biggest problem with sending DataSets through the wire, assuming that you "own" both ends, is the pure "weight" that the DataSet carries - with its interoperability, etc., this is much more than transport data. A simple collection of objects should be much easier.

If you donโ€™t โ€œownโ€ both ends or can use other clients using your service, then the DataSet is a nightmare of interaction.

If you do not care about all these problems, and you feel that collecting objects is too โ€œworkingโ€ (for example, if you are just going to transfer it back to the DataSet on the other end), then whatโ€™s your call.

Here is a good article about here .

+6

, DataTable/DataSet WCF, -, . 99,99% DTO, , () .

WCF 3.0 CTP... DataTable WCF ... , .

, .NET .

+4

, , , -. Insead -. -, - , Order. , webservice , . , . , web-. -, , -, .net-, XML /, / , .

+2

. DataSets/DataTables .

, , .

+1

- ( ):

  • - MS, , - java-?
  • , . , .
  • , , .
+1

ORM, . , , . .

0

, , -, DataSet.

DataSet - .NET. - , .

, - DataSet, -!

0

All Articles