ModelExtensions.FindEntityType Method

Definition

Overloads

FindEntityType(IModel, 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 entity type has a defining navigation.

FindEntityType(IModel, Type, String, IEntityType)

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(IModel, 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 entity type has a defining navigation.

public static Microsoft.EntityFrameworkCore.Metadata.IEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type);
[System.Diagnostics.DebuggerStepThrough]
public static Microsoft.EntityFrameworkCore.Metadata.IEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IModel * Type -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
[<System.Diagnostics.DebuggerStepThrough>]
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IModel * Type -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
<Extension()>
Public Function FindEntityType (model As IModel, type As Type) As IEntityType

Parameters

model
IModel

The model to find the entity type in.

type
Type

The type to find the corresponding entity type for.

Returns

IEntityType

The entity type, or null if none if found.

Attributes

FindEntityType(IModel, Type, String, IEntityType)

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 static Microsoft.EntityFrameworkCore.Metadata.IEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IEntityType definingEntityType);
[System.Diagnostics.DebuggerStepThrough]
public static Microsoft.EntityFrameworkCore.Metadata.IEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IEntityType definingEntityType);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IModel * Type * string * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
[<System.Diagnostics.DebuggerStepThrough>]
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IModel * Type * string * Microsoft.EntityFrameworkCore.Metadata.IEntityType -> Microsoft.EntityFrameworkCore.Metadata.IEntityType
<Extension()>
Public Function FindEntityType (model As IModel, type As Type, definingNavigationName As String, definingEntityType As IEntityType) As IEntityType

Parameters

model
IModel

The model to find the entity type in.

type
Type

The type of the entity type to find.

definingNavigationName
String

The defining navigation of the entity type to find.

definingEntityType
IEntityType

The defining entity type of the entity type to find.

Returns

IEntityType

The entity type, or null if none are found.

Attributes

Applies to