예제 #1
0
 private static IEnumerable <EdmMember> FindIsNullConditionColumns(
     MappingFragment mappingFragment)
 {
     foreach (ConditionPropertyMapping conditionPropertyMapping in ViewLoader.FlattenPropertyMappings(mappingFragment.AllProperties).OfType <ConditionPropertyMapping>())
     {
         if (conditionPropertyMapping.Column != null && conditionPropertyMapping.IsNull.HasValue)
         {
             yield return((EdmMember)conditionPropertyMapping.Column);
         }
     }
 }
예제 #2
0
 private static IEnumerable <EdmMember> FindServerGenMembers(
     MappingFragment mappingFragment)
 {
     foreach (ScalarPropertyMapping scalarPropertyMapping in ViewLoader.FlattenPropertyMappings(mappingFragment.AllProperties).OfType <ScalarPropertyMapping>())
     {
         if (MetadataHelper.GetStoreGeneratedPattern((EdmMember)scalarPropertyMapping.Column) != StoreGeneratedPattern.None)
         {
             yield return((EdmMember)scalarPropertyMapping.Property);
         }
     }
 }
예제 #3
0
 private static IEnumerable <EdmMember> FindPropertiesMappedToColumns(
     Set <EdmMember> columns,
     MappingFragment mappingFragment)
 {
     foreach (ScalarPropertyMapping scalarPropertyMapping in ViewLoader.FlattenPropertyMappings(mappingFragment.AllProperties).OfType <ScalarPropertyMapping>())
     {
         if (columns.Contains((EdmMember)scalarPropertyMapping.Column))
         {
             yield return((EdmMember)scalarPropertyMapping.Property);
         }
     }
 }
예제 #4
0
 private static IEnumerable <PropertyMapping> FlattenPropertyMappings(
     ReadOnlyCollection <PropertyMapping> propertyMappings)
 {
     foreach (PropertyMapping propertyMapping in propertyMappings)
     {
         ComplexPropertyMapping complexPropertyMapping = propertyMapping as ComplexPropertyMapping;
         if (complexPropertyMapping != null)
         {
             foreach (ComplexTypeMapping typeMapping in complexPropertyMapping.TypeMappings)
             {
                 foreach (PropertyMapping flattenPropertyMapping in ViewLoader.FlattenPropertyMappings(typeMapping.AllProperties))
                 {
                     yield return(flattenPropertyMapping);
                 }
             }
         }
         else
         {
             yield return(propertyMapping);
         }
     }
 }