public ActionResult CancleReservation(int id) { var book = bookOperations.FindById(id); var userId = User.Identity.GetUserId(); try { userOperations.CancleBooking(book, userId); book.UserId = null; db.SaveChanges(); } catch { return(View("Index")); } return(RedirectToAction("ShowBookedBooks")); }