Пример #1
0
        public ActionResult Create(BookViewModel book)
        {
            try
            {
                // TODO: Add insert logic here
                BookServices.AddNewBook(book);

                return(RedirectToAction("Index"));
            }
            catch (Exception ex)
            {
                ViewBag.MessageError = ex.Message;
                return(View());
            }
        }