Editor povezava na db

This commit is contained in:
David Štaleker
2024-02-27 07:27:47 +01:00
parent 4df426dc10
commit e92956075f
24 changed files with 1033 additions and 47 deletions

View File

@@ -36,13 +36,13 @@ namespace ZpcBulletinBoard.Pages.Boards
{
Ratio = BulletinBoard.RatioEnum.Ratio16To9,
Guid = Guid.NewGuid(),
Notes = new List<Note>()
Pages = new List<BulletinBoardPage>()
};
return Page();
}
var tmpBoard = await context.BulletinBoards.Include(x => x.Notes)
var tmpBoard = await context.BulletinBoards.Include(x => x.Pages)
.FirstOrDefaultAsync(m => m.Guid == guid);

View File

@@ -11,7 +11,7 @@ using ZpcBulletinBoard.Models.Editor;
namespace ZpcBulletinBoard.Pages.Boards
{
//[Authorize]
[Authorize]
public class IndexModel(ApplicationDbContext context) : PageModel
{
public IList<BulletinBoard> Boards { get;set; }