I want to use EF Core with the .NET Core dependency injection in a .NET Core 3.1 WPF application.
In ASP.NET, the lifetime of the scoped DbContext would be one HTTP request, but in WPF, it would be the lifetime of the whole application, which is not recommended.
So how do I manage the lifetime of the DbContext in a WPF .NET Core application?