Exemple #1
0
        public List <Produit> GetProduitByLib(String lib)
        {
            ProduitQuery   pq = new ProduitQuery(ctx);
            CategorieQuery cq = new CategorieQuery(ctx);
            List <Produit> prods;

            try
            {
                prods = pq.GetByLibelle(lib).ToList();
                prods.ForEach((p) =>
                {
                    p.Categorie = cq.GetCategorie(p.CategorieId).FirstOrDefault();
                });
            }catch (Exception e)
            {
                throw e;
            }

            return(prods);
        }
        public List <Produit> GetProduitByLibelle(string libelle)
        {
            ProduitQuery pq = new ProduitQuery(contexte);

            return(pq.GetByLibelle(libelle).ToList());
        }