IConventionEntityType.HasNoKey(Nullable<Boolean>, Boolean) Method

Definition

Caution

Use SetIsKeyless

Sets a value indicating whether the entity type has no keys. When set to true it will only be usable for queries. null to reset to default.

public void HasNoKey (bool? keyless, bool fromDataAnnotation = false);
[System.Obsolete("Use SetIsKeyless")]
public virtual void HasNoKey (bool? keyless, bool fromDataAnnotation = false);
abstract member HasNoKey : Nullable<bool> * bool -> unit
[<System.Obsolete("Use SetIsKeyless")>]
abstract member HasNoKey : Nullable<bool> * bool -> unit
override this.HasNoKey : Nullable<bool> * bool -> unit
Public Sub HasNoKey (keyless As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false)
Public Overridable Sub HasNoKey (keyless As Nullable(Of Boolean), Optional fromDataAnnotation As Boolean = false)

Parameters

keyless
Nullable<Boolean>

A value indicating whether the entity type to has no keys.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Attributes

Applies to