diff --git a/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.Designer.cs b/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.Designer.cs
index 499f0eced6b..4bc6df918a7 100644
--- a/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.Designer.cs
+++ b/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.Designer.cs
@@ -95,9 +95,9 @@ public static string UnableToGenerateEntityType([CanBeNull] object tableName)
///
/// Unable to scaffold the index '{indexName}' because at least one of the properties it contains could not be scaffolded.
///
- public static string UnableToScaffoldIndex([CanBeNull] object indexName)
+ public static string UnableToScaffoldIndexMissingProperty([CanBeNull] object indexName)
{
- return string.Format(CultureInfo.CurrentCulture, GetString("UnableToScaffoldIndex", "indexName"), indexName);
+ return string.Format(CultureInfo.CurrentCulture, GetString("UnableToScaffoldIndexMissingProperty", "indexName"), indexName);
}
///
diff --git a/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.resx b/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.resx
index adbb5a8b22a..857a2bfb03e 100644
--- a/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.resx
+++ b/src/EntityFramework.Relational.Design/Properties/RelationalDesignStrings.resx
@@ -147,7 +147,7 @@
Unable to generate entity type for table '{tableName}'.
-
+
Unable to scaffold the index '{indexName}' because at least one of the properties it contains could not be scaffolded.
diff --git a/src/EntityFramework.Relational.Design/RelationalScaffoldingModelFactory.cs b/src/EntityFramework.Relational.Design/RelationalScaffoldingModelFactory.cs
index 0740d02ee92..abd356cc872 100644
--- a/src/EntityFramework.Relational.Design/RelationalScaffoldingModelFactory.cs
+++ b/src/EntityFramework.Relational.Design/RelationalScaffoldingModelFactory.cs
@@ -263,12 +263,7 @@ protected virtual EntityTypeBuilder VisitIndexes([NotNull] EntityTypeBuilder bui
foreach (var index in indexes)
{
- var indexBuilder = VisitIndex(builder, index);
-
- if (indexBuilder == null)
- {
- Logger.LogWarning(RelationalDesignStrings.UnableToScaffoldIndex(index.Name));
- }
+ VisitIndex(builder, index);
}
return builder;
@@ -283,7 +278,7 @@ protected virtual IndexBuilder VisitIndex([NotNull] EntityTypeBuilder builder, [
if (properties.Count(p => builder.Metadata.FindProperty(p) != null) != properties.Length)
{
- // TODO log when index cannot be scaffolding because of missing columns
+ Logger.LogWarning(RelationalDesignStrings.UnableToScaffoldIndexMissingProperty(index.Name));
return null;
}
diff --git a/test/EntityFramework.MicrosoftSqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs b/test/EntityFramework.MicrosoftSqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs
index abf5ff11b60..5f02845a80d 100644
--- a/test/EntityFramework.MicrosoftSqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs
+++ b/test/EntityFramework.MicrosoftSqlServer.Design.FunctionalTests/ReverseEngineering/SqlServerE2ETests.cs
@@ -142,7 +142,7 @@ public void E2ETest_UseAttributesInsteadOfFluentApi()
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"),
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.AllDataTypes.sql_variantColumn", "sql_variant"),
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.AllDataTypes.xmlColumn", "xml"),
- RelationalDesignStrings.UnableToScaffoldIndex("IX_UnscaffoldableIndex"),
+ RelationalDesignStrings.UnableToScaffoldIndexMissingProperty("IX_UnscaffoldableIndex"),
SqlServerDesignStrings.DataTypeDoesNotAllowSqlServerIdentityStrategy("dbo.PropertyConfiguration.PropertyConfigurationID","tinyint"),
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"),
RelationalDesignStrings.PrimaryKeyErrorPropertyNotFound("dbo.TableWithUnmappablePrimaryKeyColumn"),
@@ -191,7 +191,7 @@ public void E2ETest_AllFluentApi()
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.AllDataTypes.hierarchyidColumn", "hierarchyid"),
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.AllDataTypes.sql_variantColumn", "sql_variant"),
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.AllDataTypes.xmlColumn", "xml"),
- RelationalDesignStrings.UnableToScaffoldIndex("IX_UnscaffoldableIndex"),
+ RelationalDesignStrings.UnableToScaffoldIndexMissingProperty("IX_UnscaffoldableIndex"),
SqlServerDesignStrings.DataTypeDoesNotAllowSqlServerIdentityStrategy("dbo.PropertyConfiguration.PropertyConfigurationID","tinyint"),
RelationalDesignStrings.CannotFindTypeMappingForColumn("dbo.TableWithUnmappablePrimaryKeyColumn.TableWithUnmappablePrimaryKeyColumnID", "hierarchyid"),
RelationalDesignStrings.PrimaryKeyErrorPropertyNotFound("dbo.TableWithUnmappablePrimaryKeyColumn"),