MetadataWorkspaceExtensions Class

 

Extension methods for the MetadataWorkspace API

Namespace:   Microsoft.Data.Entity.Design.DatabaseGeneration
Assembly:  Microsoft.Data.Entity.Design.DatabaseGeneration (in Microsoft.Data.Entity.Design.DatabaseGeneration.dll)

System.Object
  Microsoft.Data.Entity.Design.DatabaseGeneration.MetadataWorkspaceExtensions

public static class MetadataWorkspaceExtensions

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticGetAllAssociations(ItemCollection)

Retrieves an enumerable collection of all AssociationType elements in this ItemCollection

System_CAPS_pubmethodSystem_CAPS_staticGetAllAssociationSets(ItemCollection)

Retrieves an enumerable collection of all AssociationSet elements in this ItemCollection

System_CAPS_pubmethodSystem_CAPS_staticGetAllEntitySets(ItemCollection)

Retrieves an enumerable collection of all EntitySet elements in this ItemCollection

System_CAPS_pubmethodSystem_CAPS_staticGetAllEntityTypes(ItemCollection)

Retrieves an enumerable collection of all EntityType elements in this ItemCollection

System_CAPS_pubmethodSystem_CAPS_staticGetAllReferentialConstraints(StoreItemCollection)

Retrieves an enumerable collection of all ReferentialConstraints in this SSDL/StoreItemCollection

System_CAPS_pubmethodSystem_CAPS_staticGetAssociation(AssociationSet)

Returns the Association in an AssociationSet

System_CAPS_pubmethodSystem_CAPS_staticGetContainingTypes(EntitySet, ItemCollection)

Get all EntityTypes within this EntitySet

System_CAPS_pubmethodSystem_CAPS_staticGetDependentEnd(AssociationType)

Retrieves the dependent end of this association, given the following rules in order of priority: 1. If there is a referential constraint defined on the association, this returns the DependentEnd. 2. If the association's multiplicity is 1:1 and OnDelete='Cascade' is defined on the first end, then this returns the second end. If OnDelete='Cascade' is not defined on the first end, this returns the first end. 3. In a 1:* or 0..1:* association, this returns the end with the * multiplicity. 4. In a 0..1:1 association, this returns the end with the 0..1 multiplicity.

System_CAPS_pubmethodSystem_CAPS_staticGetDependentProperty(EdmProperty, ReferentialConstraint)

If this is a property that participates in the principal end of a referential constraint, this method will return the corresponding property on the dependent end.

System_CAPS_pubmethodSystem_CAPS_staticGetEnd1(AssociationType)

Returns the first AssociationEndMember in the AssociationEndMembers property of the specified AssociationType.

System_CAPS_pubmethodSystem_CAPS_staticGetEnd2(AssociationType)

Returns the second AssociationEndMember in the AssociationEndMembers property of the specified AssociationType.

System_CAPS_pubmethodSystem_CAPS_staticGetEntityContainerName(ItemCollection)

Retrieves the 'Name' attribute of the <EntityContainer/> element in this ItemCollection.

System_CAPS_pubmethodSystem_CAPS_staticGetEntityType(RelationshipEndMember)

Retrieves the EntityType on an AssociationEnd.

System_CAPS_pubmethodSystem_CAPS_staticGetKeyProperties(AssociationEndMember)

Gets the key properties declared directly on the EntityType within an AssociationEnd

System_CAPS_pubmethodSystem_CAPS_staticGetKeyProperties(EntityType)

Gets the key properties declared directly on the EntityType

System_CAPS_pubmethodSystem_CAPS_staticGetNamespace(ItemCollection)

Retrieves the namespace of this ItemCollection by examining the first-found StructuralType

System_CAPS_pubmethodSystem_CAPS_staticGetOnDelete(AssociationEndMember)

This will get the value of the OnDelete element on the AssociationEnd 1. This will return 'None' if the end and its sibling end have 'Cascade' specified 2. This will return 'None' if the end's multiplicity is Many (*)

System_CAPS_pubmethodSystem_CAPS_staticGetOtherEnd(AssociationType, AssociationEndMember)

Given an AssociationEndMember of this Association, this method will return the other end participating in the association

System_CAPS_pubmethodSystem_CAPS_staticGetPrincipalEnd(AssociationType)

Retrieves the principal end of this association

System_CAPS_pubmethodSystem_CAPS_staticGetRootOrSelf(EntityType)

Returns this EntityType if it has no base type. Otherwise, returns the top-most base type.

System_CAPS_pubmethodSystem_CAPS_staticGetSchemaName(EntitySet)

Retrieve the schema name for this EntitySet, stored in its MetadataProperties

System_CAPS_pubmethodSystem_CAPS_staticGetStoreGeneratedPatternValue(EdmMember, Version, DataSpace)

Obtains the StoreGeneratedPattern value of an EdmProperty, given a target version and DataSpace

System_CAPS_pubmethodSystem_CAPS_staticGetStoreType(EdmMember, DbProviderManifest)

Get the StoreType from an EdmMember's EdmType through the DbProviderManifest

System_CAPS_pubmethodSystem_CAPS_staticGetTableName(EntitySet)

Retrieve the table name for this EntitySet, stored in its MetadataProperties

System_CAPS_pubmethodSystem_CAPS_staticInferSsdlFacetsForCsdlProperty(EdmProperty, DbProviderManifest)

Infer SSDL facets from a CSDL property

System_CAPS_pubmethodSystem_CAPS_staticIsComplexProperty(EdmProperty)

Determines if this property is a ComplexProperty; that is, its type is a ComplexType

System_CAPS_pubmethodSystem_CAPS_staticIsDerivedType(EntityType)

Determines whether the specified entity type is a derived type.

System_CAPS_pubmethodSystem_CAPS_staticIsJoinTable(EntityType, StoreItemCollection)

We can infer that something is a join table in the SSDL if: 1. There are two associations originating from it 2. The two ends on the table are * 3. The other ends on the associations are 1 4. The number of properties in the table is equal to the sum of all the key properties on the other ends of both associations 5. All properties in the table are key properties

System_CAPS_pubmethodSystem_CAPS_staticIsManyToMany(AssociationType)

Determines if an association's multiplicity is *:*

System_CAPS_pubmethodSystem_CAPS_staticIsPKToPK(AssociationType)

Determines if an association is across solely primary keys

System_CAPS_pubmethodSystem_CAPS_staticToStoreType(EdmProperty)

Translate an EDM Type to a SQL type, taking into account facets. Note that certain facets were already taken into account when we obtained them from the DbProviderManifest (FixedLength, Unicode)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.