IReadOnlyModel.FindEntityType Method

Definition

Overloads

FindEntityType(String)

Gets the entity type with the given name. Returns null if no entity type with the given name is found or the given CLR type is being used by shared type entity type or the entity type has a defining navigation.

FindEntityType(Type)

Gets the entity that maps the given entity class. Returns null if no entity type with the given CLR type is found or the given CLR type is being used by shared type entity type or the entity type has a defining navigation.

FindEntityType(String, String, IReadOnlyEntityType)

Gets the entity type for the given base name, defining navigation name and the defining entity type. Returns null if no matching entity type is found.

FindEntityType(Type, String, IReadOnlyEntityType)

Gets the entity type for the given type, defining navigation name and the defining entity type. Returns null if no matching entity type is found.

FindEntityType(String)

Gets the entity type with the given name. Returns null if no entity type with the given name is found or the given CLR type is being used by shared type entity type or the entity type has a defining navigation.

public Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType? FindEntityType (string name);
abstract member FindEntityType : string -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType
Public Function FindEntityType (name As String) As IReadOnlyEntityType

Parameters

name
String

The name of the entity type to find.

Returns

The entity type, or null if none is found.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

FindEntityType(Type)

Gets the entity that maps the given entity class. Returns null if no entity type with the given CLR type is found or the given CLR type is being used by shared type entity type or the entity type has a defining navigation.

public Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType? FindEntityType (Type type);
abstract member FindEntityType : Type -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType
Public Function FindEntityType (type As Type) As IReadOnlyEntityType

Parameters

type
Type

The type to find the corresponding entity type for.

Returns

The entity type, or null if none is found.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

FindEntityType(String, String, IReadOnlyEntityType)

Gets the entity type for the given base name, defining navigation name and the defining entity type. Returns null if no matching entity type is found.

public Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType? FindEntityType (string name, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType definingEntityType);
abstract member FindEntityType : string * string * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType
Public Function FindEntityType (name As String, definingNavigationName As String, definingEntityType As IReadOnlyEntityType) As IReadOnlyEntityType

Parameters

name
String

The name of the entity type to find.

definingNavigationName
String

The defining navigation of the entity type to find.

definingEntityType
IReadOnlyEntityType

The defining entity type of the entity type to find.

Returns

The entity type, or null if none is found.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

FindEntityType(Type, String, IReadOnlyEntityType)

Gets the entity type for the given type, defining navigation name and the defining entity type. Returns null if no matching entity type is found.

public Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType? FindEntityType (Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType definingEntityType);
abstract member FindEntityType : Type * string * Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType -> Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType
Public Function FindEntityType (type As Type, definingNavigationName As String, definingEntityType As IReadOnlyEntityType) As IReadOnlyEntityType

Parameters

type
Type

The type of the entity type to find.

definingNavigationName
String

The defining navigation of the entity type to find.

definingEntityType
IReadOnlyEntityType

The defining entity type of the entity type to find.

Returns

The entity type, or null if none is found.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to