I am having an issue with dotnet core. I set a Task to runs on the thread pool with Task.Run (async => await myFunction (). ConfigureAwait (false))
. But this specific pice of code finishes after the main thread, and it need to access to the database but is causing a null exception. Can i somehow access the database running this code in second thread?
Thanks!