From a4f75d948a568e81bacc3506f8674ae005679fbe Mon Sep 17 00:00:00 2001 From: Nestisse Date: Tue, 2 Apr 2024 19:52:52 +0200 Subject: [PATCH] =?UTF-8?q?Ajout=20pour=20migrer=20vers=20la=20base=20de?= =?UTF-8?q?=20donn=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- API_SQLuedo/API/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/API_SQLuedo/API/Program.cs b/API_SQLuedo/API/Program.cs index e21ac69..c85113e 100644 --- a/API_SQLuedo/API/Program.cs +++ b/API_SQLuedo/API/Program.cs @@ -111,6 +111,10 @@ var app = builder.Build(); using (var scope = app.Services.CreateScope()) { var services = scope.ServiceProvider; + // Création base de données via les migrations + await using var dbContext = services.GetRequiredService(); + await dbContext.Database.MigrateAsync(); + var userManager = services.GetRequiredService>(); try