Your design has a parameterless constructor. You get the error "InvalidOperationException: No database provider has been configured for this DbContext." if you call the parameterless constructor in an Action or Razor Page.
_context = new VMSDBContext();
Remove the parameterless constructor and always use standard constructor injection which has the following pattern.
public class IndexModel : PageModel
{
private readonly SchoolContext _context;
public IndexModel(SchoolContext context)
{
_context = context;
}
}