Udostępnij za pośrednictwem


IMutableEntityType.RemoveForeignKey Metoda

Definicja

Przeciążenia

RemoveForeignKey(IMutableForeignKey)

Usuwa klucz obcy z tego typu jednostki.

RemoveForeignKey(IReadOnlyForeignKey)

Usuwa klucz obcy z tego typu jednostki.

RemoveForeignKey(IReadOnlyList<IProperty>, IKey, IEntityType)

Usuwa relację z tej jednostki.

RemoveForeignKey(IReadOnlyList<IReadOnlyProperty>, IMutableKey, IMutableEntityType)

Usuwa klucz obcy z tego typu jednostki.

RemoveForeignKey(IMutableForeignKey)

Usuwa klucz obcy z tego typu jednostki.

public void RemoveForeignKey (Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey foreignKey);
public Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey RemoveForeignKey (Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey foreignKey);
abstract member RemoveForeignKey : Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey -> unit
abstract member RemoveForeignKey : Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
Public Sub RemoveForeignKey (foreignKey As IMutableForeignKey)
Public Function RemoveForeignKey (foreignKey As IMutableForeignKey) As IMutableForeignKey

Parametry

foreignKey
IMutableForeignKey

Klucz obcy do usunięcia.

Zwraca

Usunięty klucz obcy.

Dotyczy

RemoveForeignKey(IReadOnlyForeignKey)

Usuwa klucz obcy z tego typu jednostki.

public Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey? RemoveForeignKey (Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey foreignKey);
abstract member RemoveForeignKey : Microsoft.EntityFrameworkCore.Metadata.IReadOnlyForeignKey -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
Public Function RemoveForeignKey (foreignKey As IReadOnlyForeignKey) As IMutableForeignKey

Parametry

foreignKey
IReadOnlyForeignKey

Klucz obcy do usunięcia.

Zwraca

Usunięty klucz obcy lub null jeśli indeks nie został znaleziony.

Dotyczy

RemoveForeignKey(IReadOnlyList<IProperty>, IKey, IEntityType)

Usuwa relację z tej jednostki.

public Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey RemoveForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IEntityType principalEntityType);
abstract member RemoveForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IProperty> * Microsoft.EntityFrameworkCore.Metadata.IKey * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
Public Function RemoveForeignKey (properties As IReadOnlyList(Of IProperty), principalKey As IKey, principalEntityType As IEntityType) As IMutableForeignKey

Parametry

properties
IReadOnlyList<IProperty>

Właściwości zdefiniowane przez klucz obcy.

principalKey
IKey

Przywołyny klucz podstawowy lub alternatywny.

principalEntityType
IEntityType

Typ jednostki, dla którego jest przeznaczona relacja. Może to różnić się od typu principalKey zdefiniowanego w przypadku, gdy relacja jest przeznaczona dla typu pochodnego w hierarchii dziedziczenia (ponieważ klucz jest zdefiniowany w podstawowym typie hierarchii).

Zwraca

Klucz obcy, który został usunięty.

Dotyczy

RemoveForeignKey(IReadOnlyList<IReadOnlyProperty>, IMutableKey, IMutableEntityType)

Usuwa klucz obcy z tego typu jednostki.

public Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey? RemoveForeignKey (System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IMutableKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType principalEntityType);
abstract member RemoveForeignKey : System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyProperty> * Microsoft.EntityFrameworkCore.Metadata.IMutableKey * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey
Public Function RemoveForeignKey (properties As IReadOnlyList(Of IReadOnlyProperty), principalKey As IMutableKey, principalEntityType As IMutableEntityType) As IMutableForeignKey

Parametry

properties
IReadOnlyList<IReadOnlyProperty>

Właściwości zdefiniowane przez klucz obcy.

principalKey
IMutableKey

Przywołyny klucz podstawowy lub alternatywny.

principalEntityType
IMutableEntityType

Typ jednostki, dla którego jest przeznaczona relacja. Może to różnić się od typu principalKey zdefiniowanego w przypadku, gdy relacja jest przeznaczona dla typu pochodnego w hierarchii dziedziczenia (ponieważ klucz jest zdefiniowany w podstawowym typie hierarchii).

Zwraca

Usunięty klucz obcy lub null jeśli indeks nie został znaleziony.

Dotyczy