Пример #1
0
        //retourne la liste des cartons jaunes
        public List <CartonsJaunesModele> ListAll()
        {
            List <CartonsJaunesModele> lcj = new List <CartonsJaunesModele>();

            using (FifaManagerEphecEntities ctx = new FifaManagerEphecEntities(_Connection))
            {
                try
                {
                    foreach (CartonsJaunes_GetAll_Result oCarte in ctx.CartonsJaunes_GetAll())
                    {
                        CartonsJaunesModele cj = new CartonsJaunesModele();

                        cj.carteJauneId = oCarte.carteJauneId;
                        cj.joueurId     = oCarte.joueurId;
                        cj.isActive     = oCarte.isActive;
                        cj.matchId      = oCarte.matchId;
                        cj.minuteRecue  = oCarte.minuteRecue;
                        cj.equipeId     = oCarte.equipeId;

                        lcj.Add(cj);
                    }
                }
                catch (Exception ex)
                {
                    if (ex.InnerException != null && ex.InnerException is SqlException)
                    {
                        TechnicalError oErreur = new TechnicalError((SqlException)ex.InnerException);
                        throw oErreur;
                    }
                    else
                    {
                        throw ex;
                    }
                }
            }
            return(lcj);
        }