我添加了一个带有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