Reputation: 68
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
......
}
this method can rewrite table name or column name, but how to add ?
Upvotes: 2
Views: 1621
Reputation: 4138
To add new columns into the Identity tables, simply modify the classes created with the project template.
public class AppUser : IdentityUser
{
public string UserNickName {get; set;}
}
And then add a new migration to tell EF to add the column to the AppUser
which it is AspNetUsers
table, if I'm not mistaken.
You can do this process with other Identity tables that you need to add column to (AppUserRole
, AppUserClaim
, etc...)
Upvotes: 1