mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
@@ -75,5 +75,10 @@ app.MapDelete("/inventory/{id}", async (int id, BarkContext db) =>
|
|||||||
return Results.Ok(new { Message = "Inventory item deleted successfully" });
|
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