mirror of
https://github.com/QuotifyTeam/QuotifyBE.git
synced 2025-12-16 14:20:06 +01:00
Seedowanie
This commit is contained in:
10
Program.cs
10
Program.cs
@@ -72,7 +72,15 @@ builder.Services.AddSwaggerGen(options =>
|
||||
options.IncludeXmlComments(Path.Combine(AppContext.BaseDirectory, xmlFilename));
|
||||
});
|
||||
|
||||
var app = builder.Build();
|
||||
var app = builder.Build();
|
||||
using (var scope = app.Services.CreateScope())
|
||||
{
|
||||
var db = scope.ServiceProvider.GetRequiredService<ApplicationDbContext>();
|
||||
var guhf = scope.ServiceProvider.GetRequiredService<GeneralUseHelpers>();
|
||||
|
||||
var seeder = new Seed(db, guhf);
|
||||
await seeder.SeedAsync();
|
||||
}
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
|
||||
Reference in New Issue
Block a user