MutableEntityTypeExtensions.GetOrSetPrimaryKey Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
GetOrSetPrimaryKey(IMutableEntityType, IMutableProperty) |
Ottiene la chiave primaria esistente di un'entità o la imposta se non è definita. |
GetOrSetPrimaryKey(IMutableEntityType, IReadOnlyList<IMutableProperty>) |
Ottiene la chiave primaria esistente di un'entità o la imposta se non è definita. |
GetOrSetPrimaryKey(IMutableEntityType, IMutableProperty)
Ottiene la chiave primaria esistente di un'entità o la imposta se non è definita.
public static Microsoft.EntityFrameworkCore.Metadata.IMutableKey GetOrSetPrimaryKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, Microsoft.EntityFrameworkCore.Metadata.IMutableProperty property);
static member GetOrSetPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * Microsoft.EntityFrameworkCore.Metadata.IMutableProperty -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
<Extension()>
Public Function GetOrSetPrimaryKey (entityType As IMutableEntityType, property As IMutableProperty) As IMutableKey
Parametri
- entityType
- IMutableEntityType
Tipo di entità su cui ottenere o impostare la chiave.
- property
- IMutableProperty
Proprietà da impostare come chiave primaria se non è già definita.
Restituisce
Chiave esistente o appena creata.
Si applica a
GetOrSetPrimaryKey(IMutableEntityType, IReadOnlyList<IMutableProperty>)
Ottiene la chiave primaria esistente di un'entità o la imposta se non è definita.
public static Microsoft.EntityFrameworkCore.Metadata.IMutableKey GetOrSetPrimaryKey (this Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType entityType, System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> properties);
static member GetOrSetPrimaryKey : Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType * System.Collections.Generic.IReadOnlyList<Microsoft.EntityFrameworkCore.Metadata.IMutableProperty> -> Microsoft.EntityFrameworkCore.Metadata.IMutableKey
<Extension()>
Public Function GetOrSetPrimaryKey (entityType As IMutableEntityType, properties As IReadOnlyList(Of IMutableProperty)) As IMutableKey
Parametri
- entityType
- IMutableEntityType
Tipo di entità su cui ottenere o impostare la chiave.
- properties
- IReadOnlyList<IMutableProperty>
Proprietà da impostare come chiave primaria se non è già definita.
Restituisce
Chiave esistente o appena creata.