Merge pull request #6 from Pup-Ion-Dev/dockertest

Dockertest
This commit is contained in:
Drew Rautenberg
2025-01-12 19:47:16 -06:00
committed by GitHub
+5
View File
@@ -75,5 +75,10 @@ app.MapDelete("/inventory/{id}", async (int id, BarkContext db) =>
return Results.Ok(new { Message = "Inventory item deleted successfully" });
});
using (var serviceScope = app.Services.CreateScope())
{
var dbContext = serviceScope.ServiceProvider.GetRequiredService<BarkContext>();
dbContext.Database.Migrate();
}
app.Run();