예제 #1
0
        public HttpResponseMessage GetDistinctSector(HttpRequestMessage request)
        {
            return(GetHttpResponse(request, () =>
            {
                string[] sectorlist = _IFRSDataService.GetDistinctSector();

                var model = new List <KeyValueData>();

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

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