I would like to add identity to my asp net core 2.1 mvc application that i am about to create in visual studio 2017. At creation i clicked individual user accounts and it created the identity area/pages etc, however i would like full control of these pages which weren't visible so ran the identity scaffolding again and clicked the overwrite all files option. This creates all the pages such as accessdenied.cshtml, confirmemail.cshtml but these are razor pages. I want these to be in the classic mvc structure, with a controller and views. I dont want any razor pages at all. Is there a way to add identity to a 2.1 mvc application that does this or will this be a copy paste job from a 2.0 app? The docs only have this https://docs.microsoft.com/en-us/aspnet/core/security/authentication/scaffold-identity?view=aspnetcore-2.1&tabs=visual-studio#full
1 Answers
-1
votes
It is impossible. Use Razor pages.
Razor pages is better match for scaffolding than MVC (more granular, less dependent on MVC magic). You will like them.
And also you will not need to jump between Views and Controllers (God bless this MS guy).
Classic ASP MVC controllers/views Scaffolding was inspired by "collect together" CRUD+List operations idea for restfull service and were good for this. But pages which manage user identity covers quite different process so MVC Controllers would just "hang in space" (there are no "restfull" logic behind).