Exemplo n.º 1
0
        public List <Fromage> selecAll()
        {
            List <Fromage> ListFromage = new List <Fromage>();

            foreach (DataRow r in NewDbal.SelectAll("Fromage").Rows)
            {
                ListFromage.Add(new Fromage((int)r["id"], (int)r["pays_origine_id"], (string)r["nom"], (int)r["creation"], (string)r["image"]));
            }

            foreach (Fromage x in ListFromage)
            {
                Console.WriteLine("id : " + x.Id + "  " + "nom : " + x.Nom);
            }
            return(ListFromage);
        }
Exemplo n.º 2
0
        public List <Pays> selectAll()
        {
            List <Pays> listPays = new List <Pays>();

            foreach (DataRow r in NewDbal.SelectAll("Pays").Rows)
            {
                listPays.Add(new Pays((int)r["id"], (string)r["nom"]));
            }


            foreach (Pays x in listPays)
            {
                Console.WriteLine(x.Id);
            }
            return(listPays);
        }