public List <pays> SelectAll() { List <pays> lespays = new List <pays>(); foreach (DataRow dl in _dbal.SelectAll("pays").Rows) { lespays.Add(new pays((int)dl["id"], (string)dl["nom"])); Console.WriteLine(dl["id"] + " " + dl["nom"]); } return(lespays); }
public List <fromage> SelectAll() { List <fromage> lesfromages = new List <fromage>(); foreach (DataRow dl in _dbal.SelectAll("fromage").Rows) { lesfromages.Add(new fromage((int)dl["id"], (int)dl["paysorigineid"], (string)dl["nom"], (string)dl["creation"], (string)dl["image"])); Console.WriteLine(dl["id"] + " " + dl["paysorigineid"] + " " + dl["nom"] + " " + dl["creation"] + " " + dl["image"]); } return(lesfromages); }