public List <FifaModeles.IntersaisonsModele> ListAll() { try { List <FifaModeles.IntersaisonsModele> lIntersaison = new List <FifaModeles.IntersaisonsModele>(); using (FifaManagerEphecEntities ctx = new FifaManagerEphecEntities(_Connection)) { foreach (Intersaisons_GetAll_Result oInter in ctx.Intersaisons_GetAll()) { FifaModeles.IntersaisonsModele inter = new FifaModeles.IntersaisonsModele(); inter.intersaisonID = oInter.intersaisonID; inter.dateDebut = oInter.dateDebut; inter.dateFin = oInter.dateFin; inter.lastUpdate = oInter.lastUpdate; inter.championnatId = oInter.championnatId; lIntersaison.Add(inter); } } return(lIntersaison); } catch (Exception ex) { if (ex.InnerException != null && ex.InnerException is SqlException) { TechnicalError oErreur = new TechnicalError((SqlException)ex.InnerException); throw oErreur; } else { throw ex; } } }