Esempio n. 1
0
        public JsonResult ListByID(string authorID)
        {
            List <Author> authors     = _pubsService.ListAuthorsByID(authorID);
            List <string> authorNames = new List <string>();

            foreach (Author author in authors)
            {
                authorNames.Add(string.Format("{0} ({1})", author.Name, author.AuthorID));
            }
            return(Json(authorNames, JsonRequestBehavior.AllowGet));
        }