Related section:
Shouldn't the folder be named Views when scaffolding identity from inside an MVC project ???
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I'm also experiencing this. It seems the scaffolding uses Razor pages instead of MVC regardless of what I try.
Could you add something to the documentation to help us understand how the code generator determines whether to generate Razor Pages or MVC Pages, or perhaps add a UI option in Visual Studio (and corresponding flag in the command line) to make an explicit choice?
No, that's how it works. It uses Razor Pages. The article starts out with
ASP.NET Core 2.1 and later provides ASP.NET Core Identity as a Razor Class Library. Applications that include Identity can apply the scaffolder to selectively add the source code contained in the Identity Razor Class Library (RCL).
Razor files .razor
(actually Blazor haha), Razor Class Libraries, Razor Pages, Razor syntax..... looks like someone was drunk...
If I scaffold something inside of an MVC project template, I want it to be MVC project compliant and I don't want a Razor Pages Scaffolding which doesn't work inside my MVC project.
It's only logical...
I have a client who is moving from ASP.NET WebPages to ASP.NET MVC.
Just so I'm understanding, they will now have to learn both ASP.NET MVC and Razor Pages to work with Identity? There is no Identity scaffolding for ASP.NET MVC projects anymore?
I'm just mentioning this because it creates a pretty significant extra learning curve for my client now. I'll need to decide whether to move them to Razor Pages instead even though they've been studying ASP.NET MVC.
I want it to be MVC project compliant
We don't have a concept of MVC project compliant
and I don't want a Razor Pages Scaffolding which doesn't work inside my MVC project.
RP was architected to work with controllers and views
I'm just mentioning this because it creates a pretty significant extra learning curve for my client now. I'll need to decide whether to move them to Razor Pages instead even though they've been studying ASP.NET MVC.
RP is could be a better choice. Our high school interns picked up RP in one day, it's not a significant extra learning curve.
Have you done any RP programming? I don't know anyone who has that would characterize it as
significant extra learning curve
@Rick-Anderson
ASP.NET Core 2.1 and later provides ASP.NET Core Identity as a Razor Class Library.
Where can we find this library in order to use Identity scaffolding with MVC ? Is it a nuget package?
@Rick-Anderson
Is not about the learning curve, it's about having consistency in our code, just like we already have in .NET Framework. The only thing I can think is to rewrite the controllers to use MVC in a MVC project instead of using Razor Pages in a MVC project.
Most helpful comment
@Rick-Anderson
Is not about the learning curve, it's about having consistency in our code, just like we already have in .NET Framework. The only thing I can think is to rewrite the controllers to use MVC in a MVC project instead of using Razor Pages in a MVC project.