diff --git a/API/Api.cs b/API/Api.cs index ab5c1d8..7e651be 100644 --- a/API/Api.cs +++ b/API/Api.cs @@ -1,5 +1,6 @@ using System.Reflection; using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.OpenApi; using SQLiteEF; @@ -49,7 +50,8 @@ public class Api app.UseAuthorization(); app.MapControllers(); - + + _tracker = app.Services.GetRequiredService(); app.Services.CreateScope().ServiceProvider.GetRequiredService().Database.Migrate(); app.Run();