public ActionResult Index() { int?userId = AuthorizeUtil.GetUserId(service, User); if (userId == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var history = service.GetOfferHistory(userId.Value); return(View(history)); }