AspNetCore.Identity.MongoDbCore
AspNetCore.Identity.MongoDbCore copied to clipboard
Is It Possible to Remove ApplicationUser Properties?
When using Microsoft's Identity package it's possible to disable ApplicationUser properties by overriding the dbContext OnModelCreating method as follows:
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
modelBuilder.Entity<IdentityUser>().Ignore(c => c.AccessFailedCount)
.Ignore(c=> c.LockoutEnabled)
.Ignore(c=>c.LockoutEndDateUtc)
.Ignore(c=>c.Roles)
.Ignore(c=>c.TwoFactorEnabled);//and so on...
modelBuilder.Entity<IdentityUser>().ToTable("Users");//to change the name of table.
}
Is there a way to do this when using this package to connect to a MongoDB database?