Ejemplo n.º 1
0
        // PUT: api/Cliente/5
        public GenericResponse <String> Put(int id, [FromBody] ClienteDto cliente)
        {
            GenericResponse <String> response = new GenericResponse <String>();

            try
            {
                cliente.Id = id;
                servicio.Actualizar(cliente);
                response = ResponseUtil.CrearRespuestaOk();
            }
            catch (CustomResponseException ex)
            {
                throw ex;
            }
            catch (Exception ex)
            {
                throw new CustomResponseException(ex.Message, 500);
            }


            return(response);
        }