public async Task<ActionResult> Create(Book book)

        {

            try

            {

                if (ModelState.IsValid)

                {

                    _respository.AddBook(book);

                    await _respository.SaveAsync();

                    return RedirectToAction("Index");

                }


                return View(book);

            }

            catch

            {

                return View(book);

            }

        }
 public void UpdateBook(Book book)
 {
     throw new NotImplementedException();
 }
 public Book AddBook(Book book)
 {
     return _context.Books.Add(book);
 }