Пример #1
0
 private void FindDroppedSequences(IEnumerable <Tuple <ISequence, ISequence> > sequencePairs, IEnumerable <ISequence> sourceSequences)
 {
     _operations.AddRange(
         sourceSequences
         .Except(sequencePairs.Select(p => p.Item1), (x, y) => MatchSequenceNames(x, y) && MatchSequenceSchemas(x, y))
         .Select(s => OperationFactory.DropSequenceOperation(s)));
 }
Пример #2
0
        public virtual IReadOnlyList <MigrationOperation> DropSchema([NotNull] IModel model)
        {
            Check.NotNull(model, "model");

            _operations = new MigrationOperationCollection();

            _operations.AddRange(GetSequences(model).Select(
                                     s => OperationFactory.DropSequenceOperation(s)));

            _operations.AddRange(model.EntityTypes.Select(
                                     t => OperationFactory.DropTableOperation(t)));

            return(OperationProcessor.Process(_operations, model, new Metadata.Model()));
        }