public void OnGet() { //If URL doesn't specify a name if (string.IsNullOrWhiteSpace(FName)) { FName = "User"; //Create default name } sngs = factory.GetActiveRecords().ToList(); }
public IActionResult OnGet() { IActionResult temp; if (HttpContext.Session.GetString("SongAdmin_Email") is null) { temp = RedirectToPage("/Admin/Index"); } else { sngs = factory.GetActiveRecords().ToList(); temp = Page(); } return(temp); }