コード例 #1
0
        public ForeignKeySpecification CreateForeignKey(PrimaryKeySpecification referencing, bool cascadeDelete = false, bool cascadeUpdate = false)
        {
            var childMigration = new CreateForeignKeyMigration(
                _migration,
                referencing.Migration,
                cascadeDelete,
                cascadeUpdate,
                Prerequisites);

            MigrationHistoryBuilder.Append(childMigration);
            childMigration.AddToParent();
            return(new ForeignKeySpecification(MigrationHistoryBuilder));
        }
コード例 #2
0
        public ForeignKeySpecification CreateForeignKey(PrimaryKeySpecification referencing, bool cascadeDelete = false, bool cascadeUpdate = false)
        {
            var childGene = new CreateForeignKeyGene(
                _gene,
                referencing.Gene,
                cascadeDelete,
                cascadeUpdate,
                Prerequisites);

            EvolutionHistoryBuilder.Append(childGene);
            childGene.AddToParent();
            return(new ForeignKeySpecification(EvolutionHistoryBuilder));
        }