using HegreHotel.Models; using SQLite; namespace HegreHotel; public class Database { private static SQLiteAsyncConnection _database; public static async Task GetConnection() { if (_database == null) { var databasePath = Path.Combine(FileSystem.AppDataDirectory, "HegreHotel.db"); _database = new SQLiteAsyncConnection(databasePath); // Créer les tables await _database.CreateTableAsync(); await _database.CreateTableAsync(); await _database.CreateTableAsync(); await _database.CreateTableAsync(); } return _database; } }