Last post Apr 30, 2018 01:41 PM by Khuram.Shahzad
Apr 26, 2018 10:56 PM|Naveen Kumar___|LINK
I want to call async Task from other normal method in Web API controller.
Anybody help how to achieve this?
Apr 27, 2018 10:14 AM|Khuram.Shahzad|LINK
You can call Async function from Sync Function by
static void Main(string args)
var result = GetDataAsync().GetAwaiter().GetResult();
static async Task GetDataAsync()
/*await stuff here*/
Apr 27, 2018 11:07 PM|Naveen Kumar___|LINK
Thanks for your reply.
My requirement is, I declared async Task in my .Net Web API controller.
Can i call this asyn Task name directly from any client? In my case I need to call from MS CRM action.
Please let me know if you have any idea on this.
Apr 30, 2018 01:41 PM|Khuram.Shahzad|LINK
If you have any client like C# console app or any other application, you can make a request ASYNc or SYNC by using HttpClient.Please have a look on the link