Okay...figured out what is probably the superior way to handle this. I created a mapping file named AspNetRoleMap.cs
public AspNetRoleMap()
{
// Primary Key
this.HasKey(t => t.Id);
// Properties
// Table & Column Mappings
this.ToTable("AspNetRoles");
this.Property(t => t.Id).HasColumnName("Id");
this.Property(t => t.Name).HasColumnName("Name");
// Relationships
this.HasMany(u => u.AspNetUsers)
.WithMany(t => t.AspNetRoles)
.Map(
m =>
{
m.MapLeftKey("RoleId");
m.MapRightKey("UserId");
m.ToTable("AspNetUserRoles");
}
);
}
Then in the DbContext OnModelCreating() I added the below to include it.
modelBuilder.Configurations.Add(new AspNetRoleMap());