Partager via


KeyDiscoveryConvention.DiscoverKeyProperties Method

Definition

Overloads

DiscoverKeyProperties(IConventionEntityType)

Returns the properties that should be used for the primary key.

DiscoverKeyProperties(IConventionEntityType, IEnumerable<IConventionProperty>)

Returns the properties that should be used for the primary key.

DiscoverKeyProperties(IConventionEntityType)

Source:
KeyDiscoveryConvention.cs

Returns the properties that should be used for the primary key.

protected virtual System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>? DiscoverKeyProperties (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType);
abstract member DiscoverKeyProperties : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
override this.DiscoverKeyProperties : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType -> System.Collections.Generic.List<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Protected Overridable Function DiscoverKeyProperties (entityType As IConventionEntityType) As List(Of IConventionProperty)

Parameters

entityType
IConventionEntityType

The entity type.

Returns

The properties that should be used for the primary key.

Applies to

DiscoverKeyProperties(IConventionEntityType, IEnumerable<IConventionProperty>)

Source:
KeyDiscoveryConvention.cs
Source:
KeyDiscoveryConvention.cs
Source:
KeyDiscoveryConvention.cs
Source:
KeyDiscoveryConvention.cs
Source:
KeyDiscoveryConvention.cs
Source:
KeyDiscoveryConvention.cs
Source:
KeyDiscoveryConvention.cs

Returns the properties that should be used for the primary key.

public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> DiscoverKeyProperties (Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType entityType, System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> candidateProperties);
static member DiscoverKeyProperties : Microsoft.EntityFrameworkCore.Metadata.IConventionEntityType * seq<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty> -> seq<Microsoft.EntityFrameworkCore.Metadata.IConventionProperty>
Public Shared Function DiscoverKeyProperties (entityType As IConventionEntityType, candidateProperties As IEnumerable(Of IConventionProperty)) As IEnumerable(Of IConventionProperty)

Parameters

entityType
IConventionEntityType

The entity type.

candidateProperties
IEnumerable<IConventionProperty>

The properties to consider.

Returns

The properties that should be used for the primary key.

Applies to