Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I'm need to call an async method which calls an external API inorder to obtain the data for tree.
TreeController requires the following method
protected override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
How do I get around the method is synchronous return type?
I think you can do this ;
var result= AsyncMethod().Result;
Really close I end up doing
var result = Task.Run(() => method()).Result;
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted