Drugi
This commit is contained in:
24
ZpcBulletinBoard/Pages/Boards/Index.cshtml.cs
Normal file
24
ZpcBulletinBoard/Pages/Boards/Index.cshtml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
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<BulletinBoard> Boards { get;set; }
|
||||
|
||||
public async Task OnGetAsync()
|
||||
{
|
||||
Boards = await context.BulletinBoards.ToListAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user