Last post Apr 21, 2020 02:24 AM by Sean Fang
Apr 20, 2020 11:42 PM|coreysan|LINK
I just created a basic startup project in VS 2019, Core 2.1 with Individual user accounts.
Once created, I noted that in Areas/Identity, there's no folder named "Account". No Login file, no Register file either.
However, when I run the project, voila! on the navbar there's the link for Register and Login, and when I click I get a page to type in credentials, etc.
How is that possible? Or, where is the page (view) coming from?
Apr 21, 2020 02:24 AM|Sean Fang|LINK
Here I would like to introduce a concept for Razor class library (RCL) which means components are able to be shared and reused.
Below link shows how to create an RCL and
ASP.NET Core Razor components class libraries: Create an RCL and Consume a library component
Let's back to track, the reason why you can directly direct to the Register and
Login page is that they are already built in the
You could find "@using Microsoft.AspNetCore.Identity" statement in <_LoginPartial.cshtml> file and corresponding instances like "SignInManager<IdentityUser> SignInManager" included.
If you would like to know more about it, you could refer to following link:
Scaffold Identity in ASP.NET Core projects
Above link introduces that the identity RCL is included in the ASP.NET Core applications and you might want to generate source code so that you can modify the code and change the behavior by
scaffolding identity into your project.
Hope this can help you.