protected virtual IEnumerable <MigrationOperation> Remove(IEntityType source, DiffContext diffContext)
        {
            var sourceAnnotations = Annotations.For(source);

            var operation = new DropTableOperation
            {
                Schema = sourceAnnotations.Schema,
                Name   = sourceAnnotations.TableName
            };

            diffContext.AddDrop(source, operation);

            yield return(operation);
        }
        protected override IEnumerable <MigrationOperation> Remove(TableMapping source, DiffContext diffContext)
        {
            var type = source.GetRootType();
            MigrationOperation operation;

            if (!type.IsUserDefinedType())
            {
                var dropOperation = new DropTableOperation {
                    Schema = source.Schema, Name = source.Name
                };
                diffContext.AddDrop(source, dropOperation);
                operation = dropOperation;
            }
            else
            {
                operation = new DropUserDefinedTypeOperation {
                    Schema = source.Schema, Name = source.Name
                };
            }

            operation.AddAnnotations(MigrationsAnnotations.ForRemove(source.EntityTypes[0]));
            yield return(operation);
        }