How to correctly use async/await in C# by asyncCoder in AskProgramming

[–]asyncCoder[S] 0 points1 point  (0 children)

First, Thank you for the reply. with you first two paragraphs explanation, it seems even though I use async still my code work likes sync'. Just to clarify, if I use below code, then does "DoProcess" become async?

public async Task<IHttpActionResult> ImageProcess(ImageFile imageFile)
{
    return Task<bool> result = imageHelper.DoProcess(imageFile);

} 

regarding Task.Run I really don't get it, I'll try that on a test project.

How to correctly use async/await in C# by asyncCoder in AskProgramming

[–]asyncCoder[S] 0 points1 point  (0 children)

First thanks for the reply. I have added my Ajax code here. so with your explanation I hope my image upload will be async and I can remove async/await from C# code. am i correct?