Sdílet prostřednictvím


MutableEntityTypeExtensions.RemoveForeignKey Metoda

Definice

Odebere cizí klíč z tohoto typu entity.

public static Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey RemoveForeignKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IMutableKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType principalEntityType);
static member RemoveForeignKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> * Microsoft.EntityFrameworkCore.Metadata.IMutableKey * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
<Extension()>
Public Function RemoveForeignKey (entityType As IMutableEntityType, properties As IReadOnlyList(Of IMutableProperty), principalKey As IMutableKey, principalEntityType As IMutableEntityType) As IMutableForeignKey

Parametry

entityType
IMutableEntityType

Typ entity.

properties
IReadOnlyList<IMutableProperty>

Vlastnosti, pro které je cizí klíč definován.

principalKey
IMutableKey

Primární nebo alternativní klíč, na který se odkazuje.

principalEntityType
IMutableEntityType

Typ entity, na který relace cílí. To se může lišit od typu definovaného podle toho, principalKey kdy relace cílí na odvozený typ v hierarchii dědičnosti (protože klíč je definován na základním typu hierarchie).

Návraty

Cizí klíč, který byl odebrán.

Platí pro