using SQLite; using System.Collections.Generic; using System.Threading.Tasks; using HegreHotel; using HegreHotel.Models; public class ClientService { // Ajouter un client public static async Task AjouterClient(Client client) { var db = await Database.GetConnection(); await db.InsertAsync(client); } // Récupérer tous les clients public static async Task> GetClientsAsync() { var db = await Database.GetConnection(); return await db.Table().ToListAsync(); } // Modifier un client public static async Task ModifierClient(Client client) { var db = await Database.GetConnection(); await db.UpdateAsync(client); } // Supprimer un client public static async Task SupprimerClient(Client client) { var db = await Database.GetConnection(); await db.DeleteAsync(client); } }