How do I convert a DataTable to an IDatareader?

后端 未结 4 1423
南旧
南旧 2021-02-07 19:03

We all know that DataReaders are quicker than DataTables since the a DataReader is used in the construction of a DataTable.

Therefore given that I already have a DataTab

4条回答
  •  孤街浪徒
    2021-02-07 19:56

    You can't. DataReader and DataTable are two different things.

    Since a DataReader enables you to read data as a stream, I don't really see why you want to do this client-side.

    A DataReader is typically used to read data from the database and add logic to fill a list of objects or a DataTable. So it's best to do most business logic which has to do with the building of the DataTable on the webservice, pass it to the client as a webservice and work with the other ADO.Net functions there for more business logic.

    Maybe you can be more specific on why you really want a DataReader?

提交回复
热议问题