public IActionResult OnGetAsync() { List <Channel> models = _channelAggregateService.GetAll(); Channels = models.Select(model => model.ToChannelIndexModel()).ToList(); return(Page()); }
public IActionResult OnGet() { var userId = HttpContext.User.Claims.FirstOrDefault(x => x.Type == ClaimTypes.NameIdentifier)?.Value; List <Channel> models = _channelAggregateService.GetAll(userId); Channels = models.Select(model => model.ToChannelIndexModel()).ToList(); return(Page()); }