IMutableEntityType.RemoveForeignKey 方法

定義

多載

RemoveForeignKey(IMutableForeignKey)

從這個實體類型移除外鍵。

RemoveForeignKey(IReadOnlyForeignKey)

從這個實體類型移除外鍵。

RemoveForeignKey(IReadOnlyList<IProperty>, IKey, IEntityType)

從這個實體移除關聯性。

RemoveForeignKey(IReadOnlyList<IReadOnlyProperty>, IMutableKey, IMutableEntityType)

從這個實體類型移除外鍵。

RemoveForeignKey(IMutableForeignKey)

從這個實體類型移除外鍵。

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

參數

foreignKey
IMutableForeignKey

要移除的外鍵。

傳回

移除的外鍵。

適用於

RemoveForeignKey(IReadOnlyForeignKey)

從這個實體類型移除外鍵。

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

參數

foreignKey
IReadOnlyForeignKey

要移除的外鍵。

傳回

移除的外鍵,如果找不到索引,則 null 為 。

適用於

RemoveForeignKey(IReadOnlyList<IProperty>, IKey, IEntityType)

從這個實體移除關聯性。

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

參數

properties
IReadOnlyList<IProperty>

定義外鍵的屬性。

principalKey
IKey

參考的主要或替代索引鍵。

principalEntityType
IEntityType

關聯性針對的實體型別。 這可能與當關聯性以繼承階層中的衍生型別為目標時所定義的類型 principalKey 不同 (,因為索引鍵是在階層的基底類型上定義) 。

傳回

已移除的外鍵。

適用於

RemoveForeignKey(IReadOnlyList<IReadOnlyProperty>, IMutableKey, IMutableEntityType)

從這個實體類型移除外鍵。

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

參數

properties
IReadOnlyList<IReadOnlyProperty>

定義外鍵的屬性。

principalKey
IMutableKey

參考的主要或替代索引鍵。

principalEntityType
IMutableEntityType

關聯性針對的實體型別。 這可能與當關聯性以繼承階層中的衍生型別為目標時所定義的類型 principalKey 不同 (,因為索引鍵是在階層的基底類型上定義) 。

傳回

移除的外鍵,如果找不到索引,則 null 為 。

適用於