Beispiel #1
0
        public HttpResponseMessage GetAvailableReferenceNumbers(HttpRequestMessage request)
        {
            return(GetHttpResponse(request, () =>
            {
                string[] refNos = _LoanService.GetAvailableReferenceNumbers();

                var model = new List <KeyValueData>();

                foreach (var s in refNos)
                {
                    model.Add(new KeyValueData()
                    {
                        Key = s, Value = s
                    });
                }

                return request.CreateResponse <KeyValueData[]>(HttpStatusCode.OK, model.ToArray());
            }));
        }