c# - On Asp.net core how to trigger action or method -


i working on asp.net core project , need on request on 1 controllers action trigger method , don't wait finish respond caller immediately. how can accomplish it?

you can use task this. however, isn't idea because if asp.net recycles, work disappear.

task.run(() => fireandforgetmethod()); 

a more robust , safe choice use hangfire.io relies on reliable storage.

backgroundjob.enqueue(() => fireandforgetmethod()); 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -