public IEnumerable <ListItem> GetList(IEnumerable <int> ids) { var result = Enumerable.Empty <ListItem>(); if (ids != null) { var idsList = ids.ToList(); if (idsList.Any()) { result = FieldService.GetList(idsList.ToArray()).Select(s => new ListItem(s.Id.ToString(), s.Name)).ToArray(); } } return(result); }