// 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)); }
// GET: Book public ActionResult Index() { var book = bookRepository.List(); return(View(book)); }
// GET: Auther public ActionResult Index() { var authers = autherReposetory.List(); return(View(authers)); }