public ActionResult CheckOut() { SellPosting sellPosting = bookRepo.getCheckout(Convert.ToInt32(Session["id"])); if (sellPosting != null) { BookDetail bookDetail = bookRepo.getBookInfo(sellPosting.BookId); CheckOutViewModel checkOutView = new CheckOutViewModel(); checkOutView.BookTitle = bookDetail.Title; checkOutView.offeredPoint = sellPosting.offeredPoint; Session["SellId"] = bookDetail.Id; return(View(checkOutView)); } else { return(View()); } }