[英]Get the default `AccountController` in .NET Core 2.2
When creating a new .NET Core 2.1 web project with individual authentication, the project will be created with AccountController
and ManageController
alongside it.创建具有个人身份验证的新 .NET Core 2.1 Web 项目时,该项目将与
AccountController
和ManageController
一起创建。
The command is:命令是:
dotnet new mvc --auth Individual
dotnet new mvc --auth 个人
However, where can I find the default AccountController
and ManageController
in .NET Core 2.2 new project?但是,我在哪里可以找到 .NET Core 2.2 新项目中默认的
AccountController
和ManageController
? I need to modify my default login logic.我需要修改我的默认登录逻辑。
By default you cannot because from ASP.NET Core 2.1 Identity is being provided as Razor Class Library with the ASP.NET Core project templates.默认情况下你不能,因为从ASP.NET Core 2.1身份是作为Razor 类库与 ASP.NET Core 项目模板一起提供的。 If you want to see those Identity related codes and customize then you have to Scaffold Identity in your project.
如果您想查看那些与 Identity 相关的代码并进行自定义,那么您必须在您的项目中使用Scaffold Identity 。
Moreover if you need ASP.NET Core Identity in MVC format then here is my GitHub Repository where Razor Page Identity has been converted to MVC in ASP.NET Core Version >= 2.2.此外,如果您需要 MVC 格式的 ASP.NET Core 标识,那么这里是我的 GitHub存储库,其中 Razor 页面标识已在ASP.NET Core 版本 >= 2.2 中转换为 MVC 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.