How to add custom table in ASP.NET IDENTITY?

后端 未结 2 462
故里飘歌
故里飘歌 2021-01-04 11:24

I\'m using ASP.NET Identity on my web form application. Below is my current identity tables:

Current Identity tables

 - Role
 - User
 - UserClaim
          


        
2条回答
  •  囚心锁ツ
    2021-01-04 11:45

    public class ApplicationUser : IdentityUser
    {
    
        public virtual ICollection 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 { get; set; }
    

提交回复
热议问题