1
  • IdentityUser Fields

    public virtual bool PhoneNumberConfirmed { get; set; } public virtual bool TwoFactorEnabled { get; set; } public virtual string SecurityStamp { get; set; } public virtual DateTime? LockoutEndDateUtc { get; set; }

Anil
  • 3,722
  • 2
  • 24
  • 49
Jigar_JP
  • 31
  • 2
  • Your question is unclear. What exactly you are trying to achieve – It's a trap Nov 15 '17 at 12:24
  • What do you want to achieve, removing some columns from database Identity tables and IdentityUser classes? Removing fields from a third party package library? In this case you may have to develop your on identity class which can inherit from this class and probably you can shadow the base columns but c# does not allow this. You may also refer https://stackoverflow.com/questions/25559878/asp-net-identity-remove-column-from-aspnetusers-table, https://stackoverflow.com/questions/106383/c-sharp-can-publicly-inherited-methods-be-hidden-e-g-made-private-to-derived – Anil Nov 15 '17 at 12:50

1 Answers1

2

Ignoring desired fields from IdentityUser

   modelBuilder.Entity<IdentityUser>().Ignore(c => c.PhoneNumberConfirmed )
                                           .Ignore(c=> c.TwoFactorEnabled )
                                           .Ignore(c=>c.SecurityStamp )
                                           .Ignore(c=>c.LockoutEndDateUtc 
Anil
  • 3,722
  • 2
  • 24
  • 49