JulioTsukamoto

Can I use a DataReader in a WCF Service




Re: Windows Communication Foundation (Indigo) DataReader in WCF

Carlos Figueira - MSFT

Inside the implementation of the service, yes, you can use DataReader's. DataReader objects aren't usually serializable, so you won't be able to use them as parameters/return values of operations on the service.





Re: Windows Communication Foundation (Indigo) DataReader in WCF

Dwight Goins

Internally you can use it, however the DataReader is not serializable, thus you cant send and receive DataReaders as input and output parameters, unless you wrap it inside a Serializable class, or use the Serialization options discussed here:

http://msdn2.microsoft.com/en-us/library/ms731073.aspx

Streaming wise, you could always use the streaming binding options available to stream data from the DataReader in and out of the Service if you implement the IDataReader interfaces and apply the stream coding respectively.

HTH