我添加了一個帶有actionfilter的類,讓我知道當前記錄的用戶是否是Admin(記錄中的布爾值)。因爲我需要在許多視圖和控制器這個信息,我把動作過濾器在Global.asax中 的問題是,如果用戶獲得更新和IsAdmin複選框被選中時,視圖不搶,除非新的更新信息我要麼重建項目,要麼重新開始視覺工作室。 這是我的代碼設置。 APPUSER實體 public class AppUser
當使用包含連字符的文件名的RazorPages時,它會導致Visual Studio的工具在有效代碼上顯示紅色波浪線。 這裏有幾個常見的錯誤,我看到: "The name ViewData does not exist in the current context" "The name TempData does not exist in the current context" "The na