src/Shared/EntityFramework/Core/Mapping/Update/Internal/ViewLoader.cs
// <summary>
// Returns all bottom-level mappings (e.g. conditions and scalar property mappings but not complex property mappings
// whose components are returned)
// </summary>
Returns all bottom-level mappings
Returns all bottom - level mappings
private static IEnumerable<PropertyMapping> FlattenPropertyMappings(
            ReadOnlyCollection<PropertyMapping> propertyMappings)
        {
            foreach (var propertyMapping in propertyMappings)
            {
                var complexPropertyMapping = propertyMapping as ComplexPropertyMapping;
                if (null != complexPropertyMapping)
                {
                    foreach (var complexTypeMapping in complexPropertyMapping.TypeMappings)
                    {
                        foreach (var nestedPropertyMapping in FlattenPropertyMappings(complexTypeMapping.AllProperties))
                        {
                            yield return nestedPropertyMapping;
                        }
                    }
                }
                else
                {
                    yield return propertyMapping;
                }
            }
        }
private static IEnumerable < PropertyMapping > FlattenPropertyMappings ( ReadOnlyCollection < PropertyMapping > propertyMappings ) { foreach ( var propertyMapping in propertyMappings ) { var complexPropertyMapping = propertyMapping as ComplexPropertyMapping ; if ( null != complexPropertyMapping ) { foreach ( var complexTypeMapping in complexPropertyMapping . TypeMappings ) { foreach ( var nestedPropertyMapping in FlattenPropertyMappings ( complexTypeMapping . AllProperties ) ) { yield return nestedPropertyMapping ; } } } else { yield return propertyMapping ; } } }
Returns all bottom-level mappings (e.g.
Returns all bottom - level mappings ( e . g .
// recursively call self with nested type
propertyMappings
ReadOnlyCollection<PropertyMapping>