ConventionEntityTypeExtensions.RemoveForeignKey Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes a foreign key from this entity type.
public static Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey RemoveForeignKey (this Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> properties, Microsoft.EntityFrameworkCore.Metadata.IConventionKey principalKey, Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType principalEntityType);
static member RemoveForeignKey : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> * Microsoft.EntityFrameworkCore.Metadata.IConventionKey * Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> Microsoft.EntityFrameworkCore.Metadata.IConventionForeignKey
<Extension()>
Public Function RemoveForeignKey (entityType As IConventionEntityType, properties As IReadOnlyList(Of IConventionProperty), principalKey As IConventionKey, principalEntityType As IConventionEntityType) As IConventionForeignKey
Parameters
- entityType
- IConventionEntityType
The entity type.
- properties
- IReadOnlyList<IConventionProperty>
The properties that the foreign key is defined on.
- principalKey
- IConventionKey
The primary or alternate key that is referenced.
- principalEntityType
- IConventionEntityType
The entity type that the relationship targets. This may be different from the type that principalKey
is defined on when the relationship targets a derived type in an inheritance hierarchy (since the key is defined on the
base type of the hierarchy).
Returns
The foreign key that was removed.
Applies to
Entity Framework
Feedback
https://aka.ms/ContentUserFeedback.
Binnenkort beschikbaar: In de loop van 2024 zullen we GitHub-problemen geleidelijk uitfaseren als het feedbackmechanisme voor inhoud en deze vervangen door een nieuw feedbacksysteem. Zie voor meer informatie:Feedback verzenden en weergeven voor