41 lines
969 B
C#
41 lines
969 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Identity;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using Microsoft.AspNetCore.Mvc.RazorPages;
|
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using ZpcBulletinBoard.Data;
|
|
using ZpcBulletinBoard.Models;
|
|
using ZpcBulletinBoard.Models.Editor;
|
|
|
|
namespace ZpcBulletinBoard.Pages.Boards
|
|
|
|
{
|
|
[AllowAnonymous]
|
|
public class ViewModel(ApplicationDbContext context)
|
|
: PageModel
|
|
{
|
|
[BindProperty] public string Guid { get; set; } = "";
|
|
public IActionResult OnGet(string? guid)
|
|
{
|
|
if (string.IsNullOrEmpty(guid))
|
|
{
|
|
return NotFound();
|
|
}
|
|
|
|
Guid = guid;
|
|
|
|
return Page();
|
|
}
|
|
|
|
|
|
}
|
|
}
|