Ejemplo n.º 1
0
        public bool updateCategorie(Categorie categorie)
        {
            bool rep = false;

            try
            {
                db.Entry(categorie).State = EntityState.Modified;
                db.SaveChanges();
                rep = true;
            }
            catch (Exception ex)
            {
            }
            return(rep);
        }
Ejemplo n.º 2
0
        //END GET SECTION

        //UPDATE SECTION
        public bool UpdateCategorie(Categorie categorie)
        {
            bool retour = false;

            try
            {
                db.Entry(categorie).State = EntityState.Modified;
                db.SaveChanges();
                retour = true;
            }
            catch (Exception e)
            {
                ErrorLog error = new ErrorLog();
                error.Libelle     = "Erreur lors de la mise à jour dans la base de donnée";
                error.Description = e.ToString();
                GetError(error);
            }
            return(retour);
        }