MutableModelExtensions.FindEntityType Method

Definition

Overloads

FindEntityType(IMutableModel, 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(IMutableModel, Type, String, IMutableEntityType)

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

FindEntityType(IMutableModel, 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 static Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Type type);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Type -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
<Extension()>
Public Function FindEntityType (model As IMutableModel, type As Type) As IMutableEntityType

Parameters

model
IMutableModel

The model to find the entity type in.

type
Type

The type to find the corresponding entity type for.

Returns

The entity type, or null if none if found.

Applies to

FindEntityType(IMutableModel, Type, String, IMutableEntityType)

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

public static Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType FindEntityType (this Microsoft.EntityFrameworkCore.Metadata.IMutableModel model, Type type, string definingNavigationName, Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType definingEntityType);
static member FindEntityType : Microsoft.EntityFrameworkCore.Metadata.IMutableModel * Type * string * Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType -> Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType
<Extension()>
Public Function FindEntityType (model As IMutableModel, type As Type, definingNavigationName As String, definingEntityType As IMutableEntityType) As IMutableEntityType

Parameters

model
IMutableModel

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
IMutableEntityType

The defining entity type of the entity type to find.

Returns

The entity type, or null if none are found.

Applies to