using Justice.Helpers; using Justice.Models; namespace Justice { public partial class App : Application { public App() { InitializeComponent(); InitializeDatabaseAsync(); // Call the async method to initialize the database } private async void InitializeDatabaseAsync() { try { var dbHelper = new DatabaseHelper(); await dbHelper.InitializeAsync(); await dbHelper.InitializeAsync();// Asynchronously create the EmergencyContact table } catch (Exception ex) { Console.WriteLine($"Database initialization failed: {ex.Message}"); } } protected override Window CreateWindow(IActivationState? activationState) { return new Window(new AppShell()); } } }