Exemplo n.º 1
0
        public IActionResult OnGetAsync()
        {
            List <Channel> models = _channelAggregateService.GetAll();

            Channels = models.Select(model => model.ToChannelIndexModel()).ToList();

            return(Page());
        }
Exemplo n.º 2
0
        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());
        }