C# 클래스 Framework.Migrator.Fluent.ForeignKey

Provides fluent interface for foreign key building. Reference is the name of relationship. Names of primary key table and column, foreign key column is generated by comvention using reference name, but can be overrided.

By default: Primary key table Reference name in singular form. Primary key column Default primary key name - Id. Foreign key column Reference name in singular form + Id. Foreign key name FK_ + Foreign Key Table + _ + Reference name in singular form.
상속: IMigrationPart, IColumn
파일 보기 프로젝트 열기: coreframework/Core-Framework

공개 메소드들

메소드 설명
Column ( String columnName ) : ForeignKey

Changes the name of foreign key column.

ForeignKey ( String reference, String foreignKeyTable ) : System

Initializes a new instance of the ForeignKey class.

GetColumn ( ) : ECM7.Migrator.Framework.Column

Gets the column specification.

Migrate ( ITransformationProvider database ) : void

Implementation of this method is speicific to operation kind (add foreign key and remove foreign key).

Named ( String foreignKeyName ) : ForeignKey

Changes the name of DeleteConstraint.

NotRequired ( ) : ForeignKey

Makes foreign key column not required.

OnDelete ( ECM7.Migrator.Framework.ForeignKeyConstraint foreignKeyConstraint ) : ForeignKey

Changes the DeleteConstraint behaviour for delete.

OnUpdate ( ECM7.Migrator.Framework.ForeignKeyConstraint foreignKeyConstraint ) : ForeignKey

Changes the DeleteConstraint behaviour for delete.

PrimaryKey ( String columnName ) : ForeignKey

Changes the name of primary key column.

Table ( String tableName ) : ForeignKey

Changes the name of primary key table.

Type ( DbType foreignKeyColumnType ) : ForeignKey

Sets the data type of foreign key column.

WithoutColumn ( ) : ForeignKey

Avoids foreign key column adding or removing.

메소드 상세

Column() 공개 메소드

Changes the name of foreign key column.
public Column ( String columnName ) : ForeignKey
columnName String Name of foreign key column.
리턴 ForeignKey

ForeignKey() 공개 메소드

Initializes a new instance of the ForeignKey class.
public ForeignKey ( String reference, String foreignKeyTable ) : System
reference String The reference.
foreignKeyTable String The foreign key table.
리턴 System

GetColumn() 공개 메소드

Gets the column specification.
public GetColumn ( ) : ECM7.Migrator.Framework.Column
리턴 ECM7.Migrator.Framework.Column

Migrate() 공개 메소드

Implementation of this method is speicific to operation kind (add foreign key and remove foreign key).
public Migrate ( ITransformationProvider database ) : void
database ITransformationProvider The database.
리턴 void

Named() 공개 메소드

Changes the name of DeleteConstraint.
public Named ( String foreignKeyName ) : ForeignKey
foreignKeyName String Name of DeleteConstraint.
리턴 ForeignKey

NotRequired() 공개 메소드

Makes foreign key column not required.
public NotRequired ( ) : ForeignKey
리턴 ForeignKey

OnDelete() 공개 메소드

Changes the DeleteConstraint behaviour for delete.
public OnDelete ( ECM7.Migrator.Framework.ForeignKeyConstraint foreignKeyConstraint ) : ForeignKey
foreignKeyConstraint ECM7.Migrator.Framework.ForeignKeyConstraint DeleteConstraint behaviour.
리턴 ForeignKey

OnUpdate() 공개 메소드

Changes the DeleteConstraint behaviour for delete.
public OnUpdate ( ECM7.Migrator.Framework.ForeignKeyConstraint foreignKeyConstraint ) : ForeignKey
foreignKeyConstraint ECM7.Migrator.Framework.ForeignKeyConstraint DeleteConstraint behaviour.
리턴 ForeignKey

PrimaryKey() 공개 메소드

Changes the name of primary key column.
public PrimaryKey ( String columnName ) : ForeignKey
columnName String Name of primary key column.
리턴 ForeignKey

Table() 공개 메소드

Changes the name of primary key table.
public Table ( String tableName ) : ForeignKey
tableName String Name of primary key table.
리턴 ForeignKey

Type() 공개 메소드

Sets the data type of foreign key column.
public Type ( DbType foreignKeyColumnType ) : ForeignKey
foreignKeyColumnType DbType Data type of foreign key column.
리턴 ForeignKey

WithoutColumn() 공개 메소드

Avoids foreign key column adding or removing.
public WithoutColumn ( ) : ForeignKey
리턴 ForeignKey