using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.EntityFrameworkCore; using Microsoft.AspNetCore.Authorization; using ZpcBulletinBoard.Data; using ZpcBulletinBoard.Models.Editor; namespace ZpcBulletinBoard.Pages.Boards { [Authorize] public class IndexModel(ApplicationDbContext context) : PageModel { public IList Boards { get;set; } public async Task OnGetAsync() { Boards = await context.BulletinBoards.ToListAsync(); } } }