// <summary> // Constructs an EntityContainerRelationshipSetEnd // </summary> // <param name="parentElement"> Reference to the schema element. </param> public EntityContainerRelationshipSetEnd(EntityContainerRelationshipSet parentElement) : base(parentElement) { }
/// <summary> /// Converts an association set from SOM to metadata /// </summary> /// <param name="relationshipSet"> The SOM element to process </param> /// <param name="providerManifest"> The provider manifest to be used for conversion </param> /// <param name="convertedItemCache"> The item collection for currently existing metadata objects </param> /// <param name="newGlobalItems"> The new GlobalItem objects that are created as a result of this conversion </param> /// <param name="container"> </param> /// <returns> The association set object resulting from the convert </returns> private static AssociationSet ConvertToAssociationSet( EntityContainerRelationshipSet relationshipSet, DbProviderManifest providerManifest, ConversionCache convertedItemCache, EntityContainer container, Dictionary<SchemaElement, GlobalItem> newGlobalItems) { Debug.Assert(relationshipSet.Relationship.RelationshipKind == RelationshipKind.Association); var associationType = (AssociationType)LoadSchemaElement( (SchemaType)relationshipSet.Relationship, providerManifest, convertedItemCache, newGlobalItems); var associationSet = new AssociationSet(relationshipSet.Name, associationType); foreach (var end in relationshipSet.Ends) { //-- need the EntityType for the end var endEntityType = (EntityType)LoadSchemaElement( end.EntitySet.EntityType, providerManifest, convertedItemCache, newGlobalItems); //-- need to get the end member var endMember = (AssociationEndMember)associationType.Members[end.Name]; //-- create the end var associationSetEnd = new AssociationSetEnd( GetEntitySet(end.EntitySet, container), associationSet, endMember); AddOtherContent(end, associationSetEnd); associationSet.AddAssociationSetEnd(associationSetEnd); // Extract optional Documentation from the end element if (end.Documentation != null) { associationSetEnd.Documentation = ConvertToDocumentation(end.Documentation); } } // Extract the optional Documentation if (relationshipSet.Documentation != null) { associationSet.Documentation = ConvertToDocumentation(relationshipSet.Documentation); } AddOtherContent(relationshipSet, associationSet); return associationSet; }
/// <summary> /// Constructs an EntityContainerRelationshipSetEnd /// </summary> /// <param name="parentElement"> Reference to the schema element. </param> public EntityContainerRelationshipSetEnd(EntityContainerRelationshipSet parentElement) : base(parentElement) { }
public EntityContainerRelationshipSetEnd(EntityContainerRelationshipSet parentElement) : base((SchemaElement)parentElement, (IDbDependencyResolver)null) { }