Hello. i am trying to use data from a transaction that finds objects from the database but i am failing, ive been trying for hours now but am not getting it right,
when i debug i can see that Result has retrieved objects and i see the transaction was successful.
I am using C# and i need to use and store objects retrieved from a transaction.
here is the class
thank you.
Hello, @Floyd_Legoana.
Can you please provide text of error?
Regards, Nikita.
I changed my code and i get that error message.
what i am trying to do is really straight forward but i am missing something…
i am trying to get data from JobCardSRF and store it in a list, using UnitOfWork.
Hello, @Floyd_Legoana.
Thank you I will investigate this issue.
Regards, Nikita.
I checked your problem.
You are getting this error because the return data type is array with dictionaries <Object, Object>
, but you specified <String, Object>
and trying to parse array to list.
Change the data type in the brackets to
Dictionary<Object, Object>[]
and error will go away. Then you can parse it to List<String, Object> if you want.
example:
if(resp.Success) {
var temp = (Dictionary<Object, Object>[])resp.Results[testTableResult.OpResultId].Result;
var parsedTemp = temp.Select(dict => dict.ToDictionary(kv => (String)kv.Key, kv => kv.Value)).ToList();
//Some logic
// ....
// ....
}
Regards, Nikita.