You can change the name of the columns in the Aspnetusers table that Identity creates in the database?
No. Column names are essential for a security check by IdentityDbContext
at the initialization of the context (see here from lines 127 to 132).
You can rename tables if you want. I explain it here.
Another question is, how to add new fields in this same table and one of them will be related to another table?
Deriving the entity:
public class Usuario : IdentityUser
{
public String InformacaoNova1 { get; set; }
public String InformacaoNova2 { get; set; }
public String InformacaoNova3 { get; set; }
}
And typifying the context with your class Usuario
:
public class MeuContexto : IdentityDbContext<Usuario> { ... }
I do a demonstration of how to change some more aspects of ASP.NET Identity here.
Thanks Gypsy Morrison. Great tips on the links presented.
– urlflavio