コード例 #1
0
        public ActionResult Edit(Ingrediente model)
        {
            if (model == null)
            {
                return(NotFound());
            }

            var pack = repo.LeerPorPKRK(model.Nombre, model.OtraCosa);

            try
            {
                pack.Nombre   = model.Nombre;
                pack.OtraCosa = model.OtraCosa;


                var resultado = repo.ActualizarIngrediente(pack);
                System.Threading.Thread.Sleep(800);
                return(RedirectToAction(nameof(Index)));
            }
            catch
            {
                return(View());
            }
        }