C# Class MigSharp.ExistingTableExtensions

Contains extension methods for the IExistingTable interface.
Mostra file Open project: dradovic/MigSharp

Public Methods

Method Description
AddForeignKeyTo ( this table, string referencedTableName ) : IAddedForeignKey

Adds a foreign key constraint to another table within the same schema with a default foreign key name.

AddIndex ( this table ) : IAddedIndex

Adds an index to the table.

AddPrimaryKey ( this table ) : IAddedPrimaryKey

Adds a primary key constraint to the table with the default name.

AddUniqueConstraint ( this table ) : IAddedUniqueConstraint

Adds an unique constraint to the table with the default name.

ForeignKeyTo ( this table, string referencedTableName ) : IForeignKey

Gets an foreign key constraint by the name of its referenced table.

PrimaryKey ( this table ) : IExistingPrimaryKey

Gets the primary key constraint of the table with the default name.

UniqueConstraintOf ( this table, string firstColumnName ) : IUniqueConstraint

Gets an unique constraint by the name of its first column.

Method Details

AddForeignKeyTo() public static method

Adds a foreign key constraint to another table within the same schema with a default foreign key name.
public static AddForeignKeyTo ( this table, string referencedTableName ) : IAddedForeignKey
table this
referencedTableName string
return IAddedForeignKey

AddIndex() public static method

Adds an index to the table.
public static AddIndex ( this table ) : IAddedIndex
table this
return IAddedIndex

AddPrimaryKey() public static method

Adds a primary key constraint to the table with the default name.
public static AddPrimaryKey ( this table ) : IAddedPrimaryKey
table this
return IAddedPrimaryKey

AddUniqueConstraint() public static method

Adds an unique constraint to the table with the default name.
public static AddUniqueConstraint ( this table ) : IAddedUniqueConstraint
table this
return IAddedUniqueConstraint

ForeignKeyTo() public static method

Gets an foreign key constraint by the name of its referenced table.
public static ForeignKeyTo ( this table, string referencedTableName ) : IForeignKey
table this
referencedTableName string
return IForeignKey

PrimaryKey() public static method

Gets the primary key constraint of the table with the default name.
public static PrimaryKey ( this table ) : IExistingPrimaryKey
table this
return IExistingPrimaryKey

UniqueConstraintOf() public static method

Gets an unique constraint by the name of its first column.
public static UniqueConstraintOf ( this table, string firstColumnName ) : IUniqueConstraint
table this
firstColumnName string
return IUniqueConstraint