示例#1
0
        public async Task OnGetAsync()
        {
            ShowModel = await context.Shows.ToListAsync();

            if (SearchString != null)
            {
                ShowModel = ShowModel.Where(s => s.Name.ToLower().Contains(SearchString)).ToList();
            }

            if (User.Identity.IsAuthenticated)
            {
                var user = await GetUserModel();

                Favorites = user.Favorites;
            }
        }