示例#1
0
        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));
        }
示例#3
0
        //
        // GET: /Comment/

        public ActionResult Index()
        {
            var comments = otherService.GetRecentComments(Request.IsSSL());

            return(View(comments));
        }