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

Popular posts from this blog

javascript - How to name a jQuery function to make a browser's back button work? -

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

collision detection - C++ library for mesh to mesh intersection: what is available? -