Asp.net 如何省略IdentityUser对象的某些字段

Asp.net 如何省略IdentityUser对象的某些字段,asp.net,asp.net-identity,Asp.net,Asp.net Identity,标识用户字段 public虚拟bool phonenumberconfirm{get;set;} 公共虚拟布尔TwoFactorEnabled{get;set;} 公共虚拟字符串SecurityStamp{get;set;} 公共虚拟日期时间?LockoutEndDateUtc{get;set;} 忽略IdentityUser中的所需字段 modelBuilder.Entity<IdentityUser>().Ignore(c => c.PhoneNumberConfir

标识用户字段

public虚拟bool phonenumberconfirm{get;set;}
公共虚拟布尔TwoFactorEnabled{get;set;}
公共虚拟字符串SecurityStamp{get;set;}
公共虚拟日期时间?LockoutEndDateUtc{get;set;}


忽略IdentityUser中的所需字段

   modelBuilder.Entity<IdentityUser>().Ignore(c => c.PhoneNumberConfirmed )
                                           .Ignore(c=> c.TwoFactorEnabled )
                                           .Ignore(c=>c.SecurityStamp )
                                           .Ignore(c=>c.LockoutEndDateUtc 
modelBuilder.Entity().Ignore(c=>c.phonenumberconfirm)
.忽略(c=>c.TwoFactorEnabled)
.Ignore(c=>c.SecurityStamp)
.Ignore(c=>c.LockoutEndDateUtc

您的问题尚不清楚。您到底想实现什么?您想实现什么,从数据库标识表和IdentityUser类中删除一些列?从第三方软件包库中删除字段?在这种情况下,您可能需要开发一个可以继承自该类的Identity类,并且可能需要下面是基础柱,但c#不允许这样。您也可以参考,谢谢Anil…让我尝试将您回复。