ReferenceReferenceBuilder.HasPrincipalKey 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.
Overloads
HasPrincipalKey(String, String[]) |
Configures the unique property(s) that this relationship targets. Typically you would only call this method if you want to use a property(s) other than the primary key as the principal property(s). If the specified property(s) is not already a unique constraint (or the primary key) then a new unique constraint will be introduced. |
HasPrincipalKey(Type, String[]) |
Configures the unique property(s) that this relationship targets. Typically you would only call this method if you want to use a property(s) other than the primary key as the principal property(s). If the specified property(s) is not already a unique constraint (or the primary key) then a new unique constraint will be introduced. |
HasPrincipalKey<TPrincipalEntity>(String[]) |
Configures the unique property(s) that this relationship targets. Typically you would only call this method if you want to use a property(s) other than the primary key as the principal property(s). If the specified property(s) is not already a unique constraint (or the primary key) then a new unique constraint will be introduced. |
HasPrincipalKey(String, String[])
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
Configures the unique property(s) that this relationship targets. Typically you would only call this method if you want to use a property(s) other than the primary key as the principal property(s). If the specified property(s) is not already a unique constraint (or the primary key) then a new unique constraint will be introduced.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder HasPrincipalKey (string principalEntityTypeName, params string[] keyPropertyNames);
abstract member HasPrincipalKey : string * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder
override this.HasPrincipalKey : string * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder
Public Overridable Function HasPrincipalKey (principalEntityTypeName As String, ParamArray keyPropertyNames As String()) As ReferenceReferenceBuilder
Parameters
- principalEntityTypeName
- String
The name of the entity type that is the principal in this relationship (the type that has the reference key properties).
- keyPropertyNames
- String[]
The name(s) of the reference key property(s).
Returns
The same builder instance so that multiple configuration calls can be chained.
Remarks
If multiple principal key properties are specified, the order of principal key properties should match the order that the primary key or unique constraint properties were configured on the principal entity type.
Applies to
HasPrincipalKey(Type, String[])
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
- Source:
- ReferenceReferenceBuilder.cs
Configures the unique property(s) that this relationship targets. Typically you would only call this method if you want to use a property(s) other than the primary key as the principal property(s). If the specified property(s) is not already a unique constraint (or the primary key) then a new unique constraint will be introduced.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder HasPrincipalKey (Type principalEntityType, params string[] keyPropertyNames);
abstract member HasPrincipalKey : Type * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder
override this.HasPrincipalKey : Type * string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder
Public Overridable Function HasPrincipalKey (principalEntityType As Type, ParamArray keyPropertyNames As String()) As ReferenceReferenceBuilder
Parameters
- principalEntityType
- Type
The entity type that is the principal in this relationship (the type that has the reference key properties).
- keyPropertyNames
- String[]
The name(s) of the reference key property(s).
Returns
The same builder instance so that multiple configuration calls can be chained.
Remarks
If multiple principal key properties are specified, the order of principal key properties should match the order that the primary key or unique constraint properties were configured on the principal entity type.
Applies to
HasPrincipalKey<TPrincipalEntity>(String[])
Configures the unique property(s) that this relationship targets. Typically you would only call this method if you want to use a property(s) other than the primary key as the principal property(s). If the specified property(s) is not already a unique constraint (or the primary key) then a new unique constraint will be introduced.
public virtual Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder HasPrincipalKey<TPrincipalEntity> (params string[] keyPropertyNames) where TPrincipalEntity : class;
abstract member HasPrincipalKey : string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder (requires 'PrincipalEntity : null)
override this.HasPrincipalKey : string[] -> Microsoft.EntityFrameworkCore.Metadata.Builders.ReferenceReferenceBuilder (requires 'PrincipalEntity : null)
Public Overridable Function HasPrincipalKey(Of TPrincipalEntity As Class) (ParamArray keyPropertyNames As String()) As ReferenceReferenceBuilder
Type Parameters
- TPrincipalEntity
The entity type that is the principal in this relationship (the type that has the reference key properties).
Parameters
- keyPropertyNames
- String[]
The name(s) of the reference key property(s).
Returns
The same builder instance so that multiple configuration calls can be chained.
Applies to
Entity Framework