Exemplo n.º 1
0
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(HttpNotFound());
            }
            BookUpdateViewModel book = _bookService.GetBookEdit(id.Value);

            if (book == null)
            {
                return(HttpNotFound());
            }
            ViewData["Authors"] = _bookService.GetAuthors();
            return(View(book));
        }