Example #1
0
 public IActionResult OnGet()
 {
     if (!HttpContext.Session.Keys.Contains("auid"))
     {
         return(RedirectToPage("/Auth/Login"));
     }
     articles = Models.Article.GetAll();
     articles.Sort((a, b) => a.Id.CompareTo(b.Id));
     foreach (var x in articles)
     {
         var user = new Models.User {
             Id = x.UserId
         };
         user.GetUserLoginNickById();
         users.Add(user);
     }
     return(Page());
 }