public List <Avis> GetForTheme(Theme theme) { string query = ""; query += "select avis.id,avis.commentaire,avis.date,avis.joueur from avis "; query += "join joueur on joueur.id = avis.joueur "; query += "join joueur_partie ON joueur.id = joueur_partie.joueur "; query += "join partie ON joueur_partie.partie = partie.id "; query += "join salle ON partie.salle = salle.id "; query += "join theme_salle ON salle.id = theme_salle.salle "; query += "where theme_salle.theme = " + theme.Id + " AND "; query += "theme_salle.dateDebut < avis.date AND "; query += "theme_salle.dateFin > avis.date "; query += "group by avis.id, avis.commentaire, avis.date, avis.joueur "; query += "order by avis.date"; DataTable tab = _dbal.RQuery(query).Tables[0]; List <Avis> lstAvis = new List <Avis>(); foreach (DataRow row in tab.Rows) { Avis avis = new Avis(row); avis.Joueur = _daoJoueur.GetById((int)row["joueur"]); lstAvis.Add(avis); } return(lstAvis); }