dev3
This commit is contained in:
40
ZpcBulletinBoard/Pages/Boards/View.cshtml.cs
Normal file
40
ZpcBulletinBoard/Pages/Boards/View.cshtml.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user