// GET: Articles
        public async Task <IActionResult> Index(int pageindex = 1, string sort = "-DateChange", string s = "")
        {
            if (s == null)
            {
                s = "";
            }
            var userRoles = await GetCurrentRolesOfUser();

            ViewBag.Title = "My Notes";
            int articlesOnPage = _constants.GetValueInt("articlesOnPage") ?? 10;
            var articles       = _allArticles.Articles(userRoles, articlesOnPage, pageindex, sort, "Name", s);

            return(View(articles));
        }
Exemple #2
0
        public async Task <IActionResult> Index()
        {
            var userRoles = await GetCurrentRolesOfUser();

            ViewBag.Title = "Home Page";

            var articles = _allArticles.Articles(userRoles, 5, 1, "-DateChange", "Name", "");

            return(View(articles));
        }