I\'m using ASP.NET Identity on my web form application. Below is my current identity tables:
- Role
- User
- UserClaim
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; }
first of all I'd suggest you to understand a bit about Code-First Entity Framework, because that's how those tables about users is created when you first create New MVC5 Applictation.
Here you can find how it is implemented if you want to use code-first database creating through the EntityFramework.
After you understand some core stuff about it, you can go to your project on Models folder, straight to> AccountModel.cs
There you have a Class which extends DbContext, which inside contains the constructor which gives access to the connectionstring on which database is about to be used.
Short important stuff if u are lazy on reading code first too much:
DbSet means that the model inside dbset, is about to be created into a table. Variables inside class, are columns that are about to be created. But if you want foreign keys and stuff, you definitely have to read code-first kind of.
Good Luck!