AddForeignKeyOperation Class

Represents a foreign key constraint being added to a table.

Namespace:  System.Data.Entity.Migrations.Model
Assembly:  EntityFramework (in EntityFramework.dll)

public class AddForeignKeyOperation : ForeignKeyOperation

The AddForeignKeyOperation type exposes the following members.

Public methodAddForeignKeyOperation Initializes a new instance of the AddForeignKeyOperation class. The PrincipalTable, PrincipalColumns, DependentTable and DependentColumns properties should also be populated.

Public propertyAnonymousArguments Gets additional arguments that may be processed by providers. (Inherited from MigrationOperation.)
Public propertyCascadeDelete Gets or sets a value indicating if cascade delete should be configured on the foreign key constraint.
Public propertyDependentColumns The names of the foreign key column(s). (Inherited from ForeignKeyOperation.)
Public propertyDependentTable Gets or sets the name of the table that the foreign key columns exist in. (Inherited from ForeignKeyOperation.)
Public propertyHasDefaultName Gets a value indicating if a specific name has been supplied for this foreign key constraint. (Inherited from ForeignKeyOperation.)
Public propertyInverse Gets an operation to drop the foreign key constraint. (Overrides MigrationOperation.Inverse.)
Public propertyIsDestructiveChangeGets a value indicating whether a change is destructive. (Overrides MigrationOperation.IsDestructiveChange.)
Public propertyName Gets or sets the name of this foreign key constraint. If no name is supplied, a default name will be calculated. (Inherited from ForeignKeyOperation.)
Public propertyPrincipalColumns The names of the column(s) that the foreign key constraint should target.
Public propertyPrincipalTable Gets or sets the name of the table that the foreign key constraint targets. (Inherited from ForeignKeyOperation.)

Public methodCreateCreateIndexOperation Gets an operation to create an index on the foreign key column(s).
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.