Run a background task from a controller action in asp.net core 2

后端 未结 3 663
一向
一向 2020-12-23 09:16

I am developing a web application with a REST Api using C# with asp.net core 2.0

What I want to achieve is when the client send a request to an endpoint I will run a

3条回答
  •  生来不讨喜
    2020-12-23 10:03

    If you are trying to create a fire & forget task like logging to db and don't want to lose dbcontext object, I have an easy way for you to implement and answered here in detail.

提交回复
热议问题