コード例 #1
0
 private void FindDroppedTables(
     Tuple <IModel, IModel> modelPair,
     IEnumerable <Tuple <IEntityType, IEntityType> > tablePairs)
 {
     _operations.AddRange(
         modelPair.Item1.EntityTypes
         .Except(tablePairs.Select(p => p.Item1))
         .Select(t => OperationFactory.DropTableOperation(t)));
 }
コード例 #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()));
        }