Share via


AddForeignKeyOperation Class

Definition

Represents a foreign key constraint being added to a table.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

public class AddForeignKeyOperation : System.Data.Entity.Migrations.Model.ForeignKeyOperation
type AddForeignKeyOperation = class
    inherit ForeignKeyOperation
Public Class AddForeignKeyOperation
Inherits ForeignKeyOperation
Inheritance

Constructors

AddForeignKeyOperation(Object)

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

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

Properties

AnonymousArguments

Gets additional arguments that may be processed by providers.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from MigrationOperation)
CascadeDelete

Gets or sets a value indicating if cascade delete should be configured on the foreign key constraint.

DependentColumns

The names of the foreign key column(s).

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from ForeignKeyOperation)
DependentTable

Gets or sets the name of the table that the foreign key columns exist in.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from ForeignKeyOperation)
HasDefaultName

Gets a value indicating if a specific name has been supplied for this foreign key constraint.

(Inherited from ForeignKeyOperation)
Inverse

Gets an operation to drop the foreign key constraint.

IsDestructiveChange

Gets a value indicating if this operation may result in data loss.

Name

Gets or sets the name of this foreign key constraint. If no name is supplied, a default name will be calculated.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from ForeignKeyOperation)
PrincipalColumns

The names of the column(s) that the foreign key constraint should target.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

PrincipalTable

Gets or sets the name of the table that the foreign key constraint targets.

Entity Framework Migrations APIs are not designed to accept input provided by untrusted sources (such as the end user of an application). If input is accepted from such sources it should be validated before being passed to these APIs to protect against SQL injection attacks etc.

(Inherited from ForeignKeyOperation)

Methods

CreateCreateIndexOperation()

Gets an operation to create an index on the foreign key column(s).

Applies to