Ejemplo n.º 1
0
        public IHttpActionResult GetArmazemPrincipal()
        {
            string result = null;

            try {
                result = PriIntegration.GetArmazemPrincipal();
            } catch (InvalidOperationException e) {
                return(BadRequest(e.Message));
            } catch (Exception) {
                return(InternalServerError());
            }


            if (result == null)
            {
                return(InternalServerError());
            }

            else
            {
                Dictionary <string, string> response = new Dictionary <string, string>();
                response.Add("armazem-principal", result);

                return(Ok(response));
            }
        }