I am trying to add profile/Membership information into my MVC5 application and adding configuration mappings.
I get the following error message:
Follow these steps around OnModelCreating method and test after each one to be aware of taking effect:
Context to prevent of their rule conflicts.base.OnModelCreating(modelBuilder); inside the mentioned
method (first of all)modelBuilder.Entity().HasKey(l => l.UserId);
modelBuilder.Entity().HasKey(r => r.Id);
modelBuilder.Entity().HasKey(r => new { r.RoleId, r.UserId });