src/Misc/EFTools/EntityDesignModel/Integrity/PropagateStoreGeneratedPatternToStorageModel.cs
/// <summary>
///     returns list of StorageProperties mapped to a ConceptualProperty via an EntitySetMapping
///     or an EntityTypeMapping
/// </summary>
/// <param name="cProp"></param>
/// <returns></returns>
returns list of StorageProperties mapped to a ConceptualProperty via an EntitySetMapping
or an EntityTypeMapping
returns list of StorageProperties mapped to a ConceptualProperty via an EntitySetMapping or an EntityTypeMapping
private static IEnumerable<StorageProperty> MappedStorageProperties(ConceptualProperty cProp)
        {
            Debug.Assert(null != cProp, "null ConceptualProperty");
            if (null != cProp)
            {
                foreach (var sp in cProp.GetAntiDependenciesOfType<ScalarProperty>())
                {
                    if (null != sp.GetParentOfType(typeof(MappingFragment)))
                    {
                        var sProp = sp.ColumnName.Target as StorageProperty;
                        if (null != sProp)
                        {
                            yield return sProp;
                        }
                    }
                }
            }
        }
private static IEnumerable < StorageProperty > MappedStorageProperties ( ConceptualProperty cProp ) { Debug . Assert ( null != cProp , " " ) ; if ( null != cProp ) { foreach ( var sp in cProp . GetAntiDependenciesOfType < ScalarProperty > ( ) ) { if ( null != sp . GetParentOfType ( typeof ( MappingFragment ) ) ) { var sProp = sp . ColumnName . Target as StorageProperty ; if ( null != sProp ) { yield return sProp ; } } } } }
returns list of StorageProperties mapped to a ConceptualProperty via an EntitySetMapping
or an EntityTypeMapping
returns list of StorageProperties mapped to a ConceptualProperty via an EntitySetMapping or an EntityTypeMapping
// loop over ConceptualProperties mapped to this ConceptualProperty // only use ScalarProperty elements inside an EntitySetMapping or EntityTypeMapping // (MappingFragment is only used by those types of mappings)
None
cProp
ConceptualProperty
None