/// <summary>
        ///
        /// </summary>
        /// <param name="getHoldingRequest"></param>
        /// <returns></returns>
        // GET: api/HoldingService
        public HttpResponseMessage Get(GetHoldingRequest getHoldingRequest)
        {
            var response = new HttpResponseMessage();

            if (getHoldingRequest == null)
            {
                response = Request.CreateResponse(HttpStatusCode.BadRequest, "Input is Empty", "application/json");
                return(response);
            }
            var getHoldingResponse = client.GetHoldingClient(getHoldingRequest);

            if (getHoldingResponse.Messages.Length > 0)
            {
                response = Request.CreateResponse(HttpStatusCode.BadRequest, getHoldingResponse, "application/json");
            }
            else
            {
                response = Request.CreateResponse(HttpStatusCode.OK, getHoldingResponse, "application/json");
            }
            return(response);
        }
示例#2
0
        public GetHoldingResponse GetHoldingClient(GetHoldingRequest getHoldingRequest)
        {
            var getHoldingResponse = client.GetHoldings(getHoldingRequest);

            return(getHoldingResponse);
        }