public static void BuildIdentityUser <TEntity, TKey>(this EntityMappingBuilder <TEntity> builder, StoreOptions storeOptions, DefaultPersonalDataProtector personalDataConverter, string tableName = UserTableName)
     where TKey : IEquatable <TKey>
     where TEntity : class, IIdentityUser <TKey>
 {
     builder.HasTableName(tableName);
     builder.HasPrimaryKey(u => u.Id);
     builder.Property(u => u.NormalizedName).HasLength(256);
     builder.Property(u => u.Name).HasLength(256);
     ///builder.HasIndex(u => u.NormalizedName).HasDatabaseName(normalizedNameIndex).IsUnique();
     storeOptions.EncryptIdentityPersonalData <TEntity>(personalDataConverter);
 }
        public static void BuildIdentityUserToken <TUser, TKey>(this EntityMappingBuilder <TUser> builder, StoreOptions storeOptions, DefaultPersonalDataProtector personalDataConverter, string tableName = UserTokenTableName)
            where TKey : IEquatable <TKey>
            where TUser : class, IIdentityUserToken <TKey>
        {
            builder.HasTableName(tableName);
            builder.HasPrimaryKey(t => new { t.UserId, t.LoginProvider, t.Name });
            var maxKeyLength = storeOptions?.MaxLengthForKeys ?? 0;

            if (maxKeyLength > 0)
            {
                builder.Property(t => t.LoginProvider).HasLength(maxKeyLength);
                builder.Property(t => t.Name).HasLength(maxKeyLength);
            }
            storeOptions.EncryptIdentityPersonalData <TUser>(personalDataConverter);
        }