コード例 #1
0
 public ActionResult AddBorrow(BookViewModel vm)
 {
     return RedirectToAction("Index");
 }
コード例 #2
0
        public ActionResult EditView(int id)
        {
            var dao = new UserService();
            var bvm = new BookViewModel();
            var book = dao.GetBook(id);

            var model = AutoMapper.Mapper.Map<Book, BookModel>(book);
            bvm.BookModel = model;

            return PartialView("_EditBook", bvm);
        }