hello I understand the life cycle of injected service like scoped that after the request is finished the service is unavailable. But the parameter (like myObject in the example) when their are destroyed? If i pass this parameter to long async task and I don't await the result I could have some problem of null in the task?
public class mycontroller : ControllerBase
{
private MyService _myservice;
public mycontroller(MyService myservice)
{
_myservice = myservice;
}
[HttpPost]
public IActionResult Post([FromBody] MyObject myObject)
{
_myservice.dosomethinglongasync(myObject);
return OK();
}
}