Scaffold Identity omits custom ApplicationUser
See original GitHub issueFrom @Ponant on July 19, 2018 15:25
Works
- New project 2.1 MVC with no auth
- Scaffold identity and choose the plus button for the user class
The resulting code is expected because it refers to ApplicationUser
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
services.AddDefaultIdentity<ApplicationUser>()
Does not work
- New project 2.1 MVC with no auth
- Create a class ApplicationUser that derives from IdentityUser
public class ApplicationUser : IdentityUser
- Scaffold identity and choose the dropdown button for the user class
The resulting code is unexpected because it refers to IdentityUser
. ApplicationUser
is totally ignored
public class ApplicationDbContext : IdentityDbContext<IdentityUser>
services.AddDefaultIdentity<IdentityUser>()
Bug?
Copied from original issue: aspnet/Identity#1886
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
c# - Scaffold the login/register UI for the customized ...
From the left pane of the Add Scaffold dialog, select Identity > Add . Now I can select with scaffolded items and the...
Read more >Scaffold Identity in ASP.NET Core projects
Learn how to scaffold Identity in an ASP. ... If you have an existing, customized layout page for Identity ( _Layout.cshtml ), select...
Read more >Can not scaffold Views based on IdentityUser model class.
I want to scaffold list/edit/create views for IdentityUser database. ... custom ApplicationUser , which is your process of custom scaffold ...
Read more >Adding Authentication and Authorisation to ASP.NET Core ...
In this blog post, we explain how to implement authentication and authorisation capabilities to an ASP.NET Core web application by exploring ...
Read more >Identity model customization in ASP.NET Core
This article describes how to customize the underlying Entity Framework Core data model for ASP.NET Core Identity.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Ponant - I’ve tracked down the root cause of this issue - it’s in the VS integration of the identity scaffolder. When I know which release the fix will be available in, I’ll update you here.
Yes, I also have been struggling with this today. I had to scaffold and then manually find/replace all instances of
IdentityUser
with my customApplicationUser
in the scaffolded files.