Share via


MappingFragment Class

Definition

Represents the metadata for mapping fragment. A set of mapping fragments makes up the Set mappings( EntitySet, AssociationSet or CompositionSet ) Each MappingFragment provides mapping for those properties of a type that map to a single table.

public class MappingFragment : System.Data.Entity.Core.Mapping.StructuralTypeMapping
type MappingFragment = class
    inherit StructuralTypeMapping
Public Class MappingFragment
Inherits StructuralTypeMapping
Inheritance

Examples

For Example if conceptually you could represent the CS MSL file as following --Mapping --EntityContainerMapping ( CNorthwind-->SNorthwind ) --EntitySetMapping --EntityTypeMapping --MappingFragment --EntityKey --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) --EntityTypeMapping --MappingFragment --EntityKey --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) --ComplexPropertyMap --ComplexTypeMapping --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) --ComplexTypeMapping --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) --DiscriminatorProperyMap ( constant value-->SMemberMetadata ) --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) --AssociationSetMapping --AssociationTypeMapping --MappingFragment --EndPropertyMap --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) --ScalarProperyMap ( CMemberMetadata-->SMemberMetadata ) --EndPropertyMap --ScalarPropertyMap ( CMemberMetadata-->SMemberMetadata ) This class represents the metadata for all the mapping fragment elements in the above example. Users can access all the top level constructs of MappingFragment element like EntityKey map, Property Maps, Discriminator property through this mapping fragment class.

Constructors

MappingFragment(EntitySet, TypeMapping, Boolean)

Creates a MappingFragment instance.

Properties

Conditions

Gets a read-only collection of property mapping conditions.

MakeColumnsDistinct

Gets a flag that indicates whether to include 'DISTINCT' when generating queries.

PropertyMappings

Gets a read-only collection of property mappings.

StoreEntitySet

Gets the EntitySet corresponding to the table or view being mapped.

TypeMapping

Gets the TypeMapping that contains this MappingFragment.

Methods

AddCondition(ConditionPropertyMapping)

Adds a property mapping condition.

AddPropertyMapping(PropertyMapping)

Adds a property mapping.

RemoveCondition(ConditionPropertyMapping)

Removes a property mapping condition.

RemovePropertyMapping(PropertyMapping)

Removes a property mapping.

Applies to