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
Post a Comment