Esempio n. 1
0
        public ActionResult Edit(int id)
        {
            LibraryClient lc   = new LibraryClient();
            Book          book = new Book();

            book = lc.GetBook(id);
            ViewBag.listAuthors = lc.GetAuthorsIdName().Select(x => new SelectListItem {
                Value = x.ID.ToString(), Text = x.NAME
            });
            ViewBag.listEditions = lc.GetEditionIdNameMVCModel().Select(x => new SelectListItem {
                Value = x.NAME, Text = x.NAME
            });
            return(View("Edit", book));
        }