示例#1
0
        /// <summary>
        /// handle the constraint element
        /// </summary>
        /// <param name="reader">XmlReader positioned at the constraint element</param>
        private void HandleConstraintElement(XmlReader reader)
        {
            Debug.Assert(reader != null);

            ReferentialConstraint constraint = new ReferentialConstraint(this);

            constraint.Parse(reader);
            this.Constraints.Add(constraint);

            if (this.Schema.DataModel == SchemaDataModelOption.EntityDataModel && this.Schema.SchemaVersion >= XmlConstants.EdmVersionForV2)
            {
                // in V2, referential constraint implies foreign key
                _isForeignKey = true;
            }
        }
 /// <summary>
 /// Constructs an EntityContainerAssociationSetEnd
 /// </summary>
 /// <param name="parentElement">Reference to the schema element.</param>
 public ReferentialConstraintRoleElement(ReferentialConstraint parentElement)
     : base(parentElement)
 {
 }