In my ASP.NET 5 app, I want to load some data from Azure into a cache inside my Startup.Configure method. The Azure SDK exposes async methods exclusively. Typically, calling an
The answers in here do not always work correctly if your async code makes further async calls, especially if those are callbacks, then you may find the code deadlocks.
This has happens on numerous occasions for me and have used the Nito.AsyncEx with great effect.
using Nito.AsyncEx;
AsyncContext.Run(async () => { await myThing.DoAsyncTask(); });