Identity in ASP.Net Core 2.1< - Customize AccountController
My solution is create project with .net core 2.0, and then update the framework to 2.1 and all the dependence to latest version
One of the changes in 2.1 was Razor Class Libraries and the default identity lives in one of these in the individual auth templates. If you would like to have the code in your app so you can customise it, you can scaffold it out with Visual Studio, or with the global scaffolder tool. See this guide on how to do both.
ASP.NET Core 2.1 introduced new feature called Razor class libraries that lets you build views and pages as part of reusable library. ASP.NET Core Identity was moved to such RCL. You can override it in your project:
- From Solution Explorer, right-click on the project > Add > New Scaffolded Item.
- From the left pane of the Add Scaffold dialog, select Identity > ADD.
- In the ADD Identity dialog, choose files you wish to override.
- Select layout if necessary
- Select or create Data context class.
- Hit ADD.
For more information visit documentation.