RavenOverflow.Web.Controllers.HomeController.BatchedIndex C# (CSharp) Method

BatchedIndex() private method

private BatchedIndex ( string displayName, string tag ) : System.Web.Mvc.ActionResult
displayName string
tag string
return System.Web.Mvc.ActionResult
        public ActionResult BatchedIndex(string displayName, string tag)
        {
            string header;

            // 1. All the questions, ordered by most recent.
            Lazy<IEnumerable<QuestionWithDisplayName>> questionsQuery = QuestionQuery(tag, out header).Lazily();

            // 2. Popular Tags for a time period.
            // StackOverflow calls it 'recent tags'.
            Lazy<IEnumerable<RecentPopularTags.ReduceResult>> recentPopularTags = RecentPopularTagsQuery().Lazily();

            // 3. Log in user information.
            IQueryable<User> userQuery = UserQuery(displayName);
            Lazy<IEnumerable<User>> lazyUserQuery = (userQuery != null ? userQuery.Lazily() : null);

            var viewModel = new IndexViewModel(ClaimsUser)
            {
                Header = header,
                QuestionListViewModel = new QuestionListViewModel
                {
                    Questions = questionsQuery.Value.ToList()
                },
                RecentPopularTags = recentPopularTags.Value.ToDictionary(x => x.Tag, x => x.Count),
                UserFavoriteTagListViewModel = new UserTagListViewModel
                {
                    Header = "Favorite Tags",
                    DivId1 = "interesting-tags",
                    DivId2 = "interestingtags",
                    Tags = lazyUserQuery == null
                               ? null
                               : (lazyUserQuery.Value.
                                                SingleOrDefault() ??
                                  new User()).FavoriteTags
                },
                UserIgnoredTagList = new UserTagListViewModel
                {
                    Header = "Ignored Tags",
                    DivId1 = "ignored-tags",
                    DivId2 = "ignoredtags",
                    Tags = null
                }
            };

            return View("Index", viewModel);
        }