Kev*_*ell 11 c# asp.net webforms asp.net-identity
我在我的Web表单应用程序上使用ASP.NET标识.以下是我目前的身份表:
- Role
- User
- UserClaim
- UserLogin
- UserRole
Run Code Online (Sandbox Code Playgroud)
我需要添加一个新表来存储其他信息.
新表中的字段:
如何添加此自定义表?我知道如何在现有表中添加自定义字段,但我不知道如何实现这一点.
感谢您为我的问题找到解决方案的努力.
Kev*_*ell 10
public class ApplicationUser : IdentityUser
{
public virtual ICollection<UserLog> UserLogs { get; set; }
}
public class UserLog
{
[Key]
public Guid UserLogID { get; set; }
public string IPAD { get; set; }
public DateTime LoginDate { get; set; }
public string UserId { get; set; }
[ForeignKey("UserId")]
public virtual ApplicationUser User { get; set; }
}
public System.Data.Entity.DbSet<UserLog> UserLog { get; set; }
Run Code Online (Sandbox Code Playgroud)