我的数据库中有一个名为 User 的表。我还有一个内置身份验证的 .net 核心项目。我想连接到我的数据库,并且在脚手架显示我的用户类之后,我希望它从 IdentityUser 继承。
脚手架顺利后,我尝试从IdentityUser继承。
public partial class User :IdentityUser<int>
{
public int Id { get; set; }
public string Country { get; set; }
public string PersonalId { get; set; }
public string MobilePhone { get; set; }
public string Email { get; set; }
public DateTime BirthDate { get; set; }
public string Password { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public byte[] Idimage { get; set; }
public bool? EmailConfirmed { get; set; }
public bool? Smsconfirmed { get; set; }
}
在我的数据库中,我看不到 PasswordHash、PhoneNumberConfirmed 等身份字段。具体来说,在用户表中。