when I try to run the line:
ApplicationDbContext context = app.ApplicationServices.GetRequiredService<ApplicationDbContext>()
I get presented with an error: "System.InvalidOperationException: 'Cannot resolve scoped service 'SportsStore.Models.ApplicationDbContext' from root provider.'"
I saw an answer to a similar question(Cannot resolve scoped service from root provider - solution to error?), but idk how to do it in asp.net core mvc 6.0.