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

QuestionQuery() private method

private QuestionQuery ( string tag, string &header ) : IQueryable
tag string
header string
return IQueryable
        private IQueryable<QuestionWithDisplayName> QuestionQuery(string tag, out string header)
        {
            header = "Top Questions";

            IQueryable<Question> questionsQuery = DocumentSession.Query<Question, Questions_Search>()
                                                                 .OrderByCreatedByDescending()
                                                                 .Take(20);

            // Filter Questions by Tags?
            if (!string.IsNullOrEmpty(tag))
            {
                header = "Tagged Questions";
                questionsQuery = questionsQuery
                    .WithAnyTag(tag);
            }

            return questionsQuery.As<QuestionWithDisplayName>();
        }