Posted on: 5/3/2014 6:55:48 PM | Views : 652

I am trying to extend the IdentityUser class:
public class User : IdentityUser { public Address Address { get; set; } }//end of class User here is my DbContext class:
public class MembershipContext : IdentityDbContext<User> { protected override void OnModelCreating(System.Data.Entity.DbModelBuilder modelBuilder) { modelBuilder.ComplexType<Address>(); modelBuilder.Entity<IdentityUserRole>().HasKey(x => x.RoleId); modelBuilder.Entity<IdentityUserLogin>().HasKey(x => x.ProviderKey); } }//end of class MembershipContext When Ef Generates the tables in the IdentityUserRoles table it creates a RoleId column, a UserId column and a IdentityRole_Id column, which when a user is add to a role
the RoleId and IdentityRole_Id have the same value. If I remov ...

Go to the complete details ...