Exemplo n.º 1
0
        public ActionResult Delete(long? id)
        {
            ViewBookViewModel view = new ViewBookViewModel
            {
                Book = _service.GetBook(id ?? 0)
            };

            return View(view);
        }
Exemplo n.º 2
0
        public ActionResult View(long? id)
        {
            BookModel book = _service.GetBook(id ?? 0);
            CategoryModel category = _service.GetCategory(book.CategoryId);

            ViewBookViewModel view = new ViewBookViewModel
            {
                Book = book,
                Category = category
            };

            return View(view);
        }