mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-12 22:11:54 +00:00
@@ -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();
|
||||
app.Run();
|
||||
|
||||
Reference in New Issue
Block a user