Ejemplo n.º 1
0
        // GET: Book/Edit/5
        public ActionResult Edit(int id)
        {
            var book      = bookRepository.Find(id);
            var viewModel = new BookAutherViewModel
            {
                BookID      = book.id,
                Title       = book.Title,
                Description = book.Description,
                AutherID    = book._auther.id,
                Authers     = autherRepository.List().ToList(),
                imgUrl      = book.imgURL
            };

            return(View(viewModel));
        }
Ejemplo n.º 2
0
        // GET: Book
        public ActionResult Index()
        {
            var book = bookRepository.List();

            return(View(book));
        }
Ejemplo n.º 3
0
        // GET: Auther
        public ActionResult Index()
        {
            var authers = autherReposetory.List();

            return(View(authers));
        }