Example #1
0
        public IHttpActionResult EliminarIngrediente(int id)
        {
            try
            {
                IngredientesNegocio auxIngrediente = new IngredientesNegocio();
                string mensaje = auxIngrediente.EliminarIngrediente(id);

                Response response = new Response
                {
                    Code    = 200,
                    Message = mensaje
                };

                return(Ok(response));
            }
            catch (Exception ex)
            {
                Response response = new Response
                {
                    Code    = 400,
                    Message = ex.Message
                };

                return(Ok(response));
            }
        }