public List <FifaModeles.MatchsModele> ListAll() { List <FifaModeles.MatchsModele> lMatchs = new List <FifaModeles.MatchsModele>(); using (FifaManagerEphecEntities ctx = new FifaManagerEphecEntities(_Connection)) { try { foreach (Matchs_GetAll_Result oMatch in ctx.Matchs_GetAll()) { FifaModeles.MatchsModele match = new FifaModeles.MatchsModele(); match.matchId = oMatch.matchId; match.matchDate = oMatch.matchDate; match.equipe1Id = oMatch.equipe1Id; match.equipe2Id = oMatch.equipe2Id; match.equipe1Points = oMatch.equipe1Points; match.equipe2Points = oMatch.equipe2Points; match.isPlayed = oMatch.isPlayed; match.lastUpdate = oMatch.lastUpdate; lMatchs.Add(match); } } catch (Exception ex) { if (ex.InnerException != null && ex.InnerException is SqlException) { TechnicalError oErreur = new TechnicalError((SqlException)ex.InnerException); throw oErreur; } else { throw ex; } } } return(lMatchs); }