Exemplo n.º 1
0
        public override async Task InitializeAsync()
        {
            // Let's re-create the database first
            await using var dbContext = HostServices.GetRequiredService <IDbContextFactory <AppDbContext> >().CreateDbContext();
            await dbContext.Database.EnsureDeletedAsync();

            await dbContext.Database.EnsureCreatedAsync();

            await base.InitializeAsync();
        }