コード例 #1
0
        public IHttpActionResult ClientByPolicyNumber(string number)
        {
            try
            {
                ClientsDto clientDto = clientsService.GetByPolicyNumber(number);

                if (clientDto != null)
                {
                    return(Ok(clientDto));
                }
                else
                {
                    throw new HttpResponseException(HttpStatusCode.BadRequest);
                }
            }
            catch (VuelingExceptions ex)
            {
                throw new VuelingExceptions("No se han podido obtener los clientes.", ex);
            }
        }