Loop through IRestResponse or convert to Generic list or Data Table

322 views
Skip to first unread message

Neeraj Saini

unread,
Feb 4, 2014, 12:20:37 AM2/4/14
to rest...@googlegroups.com
Hi,

Can anyone please let me know how can I loop through IRestResponse or convert it to a Generic List or convert to a data table.

Mainly I have the data back from the service in IRestResponse<List<Lists>>

IRestResponse<List<Lists>> response2 = client.Execute<List<Lists>>(request);

And want to save these values in the database.

Thanks
NS

Neeraj Saini

unread,
Feb 6, 2014, 10:19:00 AM2/6/14
to rest...@googlegroups.com
Is this possible, Can anyone please let me know?

Thanks
NS

Neeraj Saini

unread,
Feb 6, 2014, 10:26:34 AM2/6/14
to rest...@googlegroups.com
This is error

Error 1 foreach statement cannot operate on variables of type 'RestSharp.IRestResponse<System.Collections.Generic.List<Entities.Lists>>' because 'RestSharp.IRestResponse<System.Collections.Generic.List<Entities.Lists>>' does not contain a public definition for 'GetEnumerator'

On Monday, February 3, 2014 9:20:37 PM UTC-8, Neeraj Saini wrote:
Reply all
Reply to author
Forward
0 new messages