Esempio n. 1
0
        public List <Book> getAllBook()
        {
            //var syncClient = new WebClient();
            //var content = syncClient.DownloadString(BASE_URL+"Books");
            //var json_serializer = new JavaScriptSerializer();
            //return json_serializer.Deserialize<List<Book>>(content);
            BookServicesClient client = new BookServicesClient();
            var rt = new List <Book>();

            (client.GetBookList()).ToList().ForEach(b => rt.Add(new Book()
            {
                BookId = b.BookId, ISBN = b.ISBN, Title = b.Title
            }));
            return(rt);
        }