Q:

What is the best patter to call async methods after app start? ( Fire&Forget in Constructor?) 

In my application I want to setup my ViewModels by queried data (from async methods) right after my application started. 
In my case I have a .NET Framework WPF application and after the start I want to begin loading the data by async methods.  After awaiting the data I want to update my view models. 
What is the best way and the best entry point to do this? 
My first approach is the following:
public App()
{
    // Do synchronous initializing stuff

    // Load data and initialize by viewmodel with it
#pragma warning disable CS4014
    ProgramStateViewModel. Instance. LoadDataAndSetupAsync();
#pragma warning restore CS4014
}

The problem with this is I got the compiler warning and I have to handle it by suppressing it. 
Actually I want a Fire-and-Forget call, but the method I am calling is async and returns a Task. 
How to do it better? 

A:

You can attach an async Startup event handler:
public App()
{
    Startup += async (s, e) =>
    {
        await ProgramStateViewModel. Instance. LoadDataAndSetupAsync();
    };
}

