/// <summary>
        /// Performs a deep copy of the specified <see cref="EdmUniqueConstraint"/>.
        /// </summary>
        /// <param name="edmUniqueConstraint">The <see cref="EdmUniqueConstraint"/> to deep copy.</param>
        /// <returns>A deep copy of the <see cref="EdmUniqueConstraint"/>.</returns>
        private static EdmUniqueConstraint Clone(this EdmUniqueConstraint edmUniqueConstraint)
        {
            var clone = new EdmUniqueConstraint(edmUniqueConstraint.Name)
                        .WithProperties(edmUniqueConstraint.Properties.Select(p => p.Name).ToArray());

            CopyAnnotations(clone, edmUniqueConstraint.Annotations);

            return(clone);
        }
Beispiel #2
0
 /// <summary>
 /// Adds given Edm Unique Constraint to <see cref="EdmUniqueConstraints"/> collection.
 /// </summary>
 /// <param name="edmUniqueConstraint">Edm Unique Constraint to add.</param>
 public void Add(EdmUniqueConstraint edmUniqueConstraint)
 {
     this.EdmUniqueConstraints.Add(edmUniqueConstraint);
 }
Beispiel #3
0
 /// <summary>
 /// Adds given Edm Unique Constraint to <see cref="EdmUniqueConstraints"/> collection.
 /// </summary>
 /// <param name="edmUniqueConstraint">Edm Unique Constraint to add.</param>
 public void Add(EdmUniqueConstraint edmUniqueConstraint)
 {
     this.EdmUniqueConstraints.Add(edmUniqueConstraint);
 }