I have been a fan of Entity Framework for many years, and have relied on using the context within the Configure(..)
method in Startup.cs, but that is not available when using top-level statements. This post shows how to use the context within Program.cs
.