public List <Profils> SelectNomProfil() { Profils profilName = null; try { this.ConnexionOpen(); //Selection de l'historique string sqlNomProfil = "select lib_profil, id_profil from profil; "; SqliteCommand commandaNomProfil = new SqliteCommand(sqlNomProfil, connexion); SqliteDataReader result = commandaNomProfil.ExecuteReader(); List <Profils> profilNames = new List <Profils>(); //List<string> profilListExpensible; while (result.Read()) { //Historiques historiques = new Historiques(); profilName = new Profils(); String chaine = result.GetString(0); String chaine1 = result.GetString(1); profilName.CreeProfil(chaine, chaine1); profilNames.Add(profilName); } result.Close(); return(profilNames); } //Retourne le message d'erreur SQL catch { List <Profils> profilNames = new List <Profils>(); return(profilNames); } //Fermeture de la connexion finally { this.ConnexionClose(); } }