Exemplo n.º 1
0
        public IHttpActionResult UpdateProperty(int tpid, [FromBody] TradingPartnerIdentifierDto dto)
        {
            try
            {
                var entity = _tpService.GetIdentifier(tpid, dto.Id);

                if (entity == null)
                {
                    return(NotFound());
                }

                return(Ok(_tpService.UpdateIdentifier(tpid, dto)));
            }
            catch (Exception ex)
            {
                //LOG
                //return StatusCode(HttpStatusCode.InternalServerError);
                return(InternalServerError(new Exception("An unexpected error occured! Please try again later!")));
            }
        }