예제 #1
0
        public IActionResult OnGetAsync()
        {
            List <Channel> models = _channelAggregateService.GetAll();

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

            return(Page());
        }
예제 #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());
        }