c# - Async await in Controller Action: Error: Can not await 'void' -
i using async controller action returns jsonresult. , send notification methods returns void.
public async task<jsonresult> setstatus(string msg) { await sendnotification(msg); } i getting error 'can not await 'void'
your sendnotification has return task, await keyword definition.
it's kind of javascript promise (just give idea), has have done, failed functions, in order able track execution flow of async function.
Comments
Post a Comment