Exemple #1
0
        private void FindDroppedUniqueConstraints(
            Tuple <IEntityType, IEntityType> tablePair,
            IEnumerable <Tuple <IKey, IKey> > uniqueConstraintPairs)
        {
            var pk1 = tablePair.Item1.TryGetPrimaryKey();

            _operations.AddRange(
                tablePair.Item1.Keys.Where(k => k != pk1)
                .Except(uniqueConstraintPairs.Select(pair => pair.Item1))
                .Select(uc => OperationFactory.DropUniqueConstraintOperation(uc)));
        }