Error 'System.Data.DataRowCollection' does not contain a definition for 'Cast' and no extension method 'Cast' accepting a first argument of type 'System.Data.DataRowCollection' could be found (are you missing a using directive or an assembly reference?)
To me it looks like the JSON Serialization of Array of DataRow is not happening.
I tried replicating this use case at my end and it gave me following exception
A circular reference was detected while serializing an object of type 'System.Reflection.RuntimeModule'.
My recommendation would be to create a custom class with properties Name, Time and InUse to store the data which you want to return to UI. Create object of that classe and populate the properties of that object from the data rows and create array of those objects and return them as JSON object from the server to the UI.
Midhun TpPosted Dec 29, 2016, 12:05 AM
sudipta sanyalPosted Dec 28, 2016, 7:26 AM
Dinesh SanthalingamPosted Dec 28, 2016, 7:24 AM
sudipta sanyalPosted Dec 28, 2016, 7:21 AM
Dinesh SanthalingamPosted Dec 28, 2016, 7:13 AM
sudipta sanyal
sudipta sanyalPosted Dec 28, 2016, 6:46 AM
Chetan RanpariyaPosted Dec 28, 2016, 6:33 AM
A circular reference was detected while serializing an object of type 'System.Reflection.RuntimeModule'.
My recommendation would be to create a custom class with properties Name, Time and InUse to store the data which you want to return to UI. Create object of that classe and populate the properties of that object from the data rows and create array of those objects and return them as JSON object from the server to the UI.