public async Task <ActionResult> Index(int?userId = null) { if (userId.HasValue) { var user = _userService.GetUser(userId.Value); return(View("CommentsByUser", user)); } else { var comments = await _otherService.GetRecentComments(); return(View(comments)); } }
// // GET: /Comment/ public async Task <ActionResult> Index() { var comments = await otherService.GetRecentComments(); return(View(comments)); }
// // GET: /Comment/ public ActionResult Index() { var comments = otherService.GetRecentComments(Request.IsSSL()); return(View(comments)); }