Exemplo n.º 1
0
        public IHttpActionResult Get(string id)
        {
            if (string.IsNullOrWhiteSpace(id))
            {
                return(NotFound());
            }
            var codes = repo.GetList(id.Split(',')).ToList();
            Dictionary <string, List <Option> > dic = codes.ToDictionary(c => c.CodeNo, c => c.Options);

            //if (id.Contains("GBT2260-2007"))
            //{
            //    var list = repository.GetAllAreas().OrderBy(o => o.ParentId).Select(o => new Option() { Name = o.AreaName, Value = o.AreaId.ToString(), Parent = o.ParentId.ToString() }).ToList();
            //    //var areaList = CacheManager.Get(CacheManager.AreaKey);
            //    dic.Add("GBT2260-2007", list);
            //}
            return(Ok(dic));
        }