ModelExtensions.GetEntityTypes 方法

定义

重载

GetEntityTypes(IModel, String)
已过时.

获取与给定名称匹配的实体类型。

GetEntityTypes(IModel, Type)
已过时.

获取与给定类型匹配的实体类型。

GetEntityTypes(IModel, String)

注意

Use FindEntityTypes(Type) or FindEntityType(string)

获取与给定名称匹配的实体类型。

public static System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, string name);
[System.Diagnostics.DebuggerStepThrough]
public static System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, string name);
[System.Diagnostics.DebuggerStepThrough]
public static System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.IEntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, string name);
[System.Diagnostics.DebuggerStepThrough]
[System.Obsolete("Use FindEntityTypes(Type) or FindEntityType(string)")]
public static System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, string name);
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string -> System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType>
[<System.Diagnostics.DebuggerStepThrough>]
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string -> System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType>
[<System.Diagnostics.DebuggerStepThrough>]
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string -> System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.IEntityType>
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Obsolete("Use FindEntityTypes(Type) or FindEntityType(string)")>]
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string -> System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType>
<Extension()>
Public Function GetEntityTypes (model As IModel, name As String) As IReadOnlyCollection(Of EntityType)
<Extension()>
Public Function GetEntityTypes (model As IModel, name As String) As IReadOnlyCollection(Of IEntityType)
<Extension()>
Public Function GetEntityTypes (model As IModel, name As String) As IReadOnlyCollection(Of IReadOnlyEntityType)

参数

model
IModel

要查找实体类型的模型。

name
String

要查找的实体类型的名称。

返回

IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType>

找到的实体类型。

属性

适用于

GetEntityTypes(IModel, Type)

注意

Use IReadOnlyEntityType.FindEntityTypes

获取与给定类型匹配的实体类型。

public static System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type);
[System.Diagnostics.DebuggerStepThrough]
public static System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type);
[System.Diagnostics.DebuggerStepThrough]
public static System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.IEntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type);
[System.Diagnostics.DebuggerStepThrough]
[System.Obsolete("Use IReadOnlyEntityType.FindEntityTypes")]
public static System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType> GetEntityTypes (this Microsoft.EntityFrameworkCore.Metadata.IModel model, Type type);
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * Type -> System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType>
[<System.Diagnostics.DebuggerStepThrough>]
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * Type -> System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType>
[<System.Diagnostics.DebuggerStepThrough>]
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * Type -> System.Collections.Generic.IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.IEntityType>
[<System.Diagnostics.DebuggerStepThrough>]
[<System.Obsolete("Use IReadOnlyEntityType.FindEntityTypes")>]
static member GetEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * Type -> seq<Microsoft.EntityFrameworkCore.Metadata.IReadOnlyEntityType>
<Extension()>
Public Function GetEntityTypes (model As IModel, type As Type) As IReadOnlyCollection(Of EntityType)
<Extension()>
Public Function GetEntityTypes (model As IModel, type As Type) As IReadOnlyCollection(Of IEntityType)
<Extension()>
Public Function GetEntityTypes (model As IModel, type As Type) As IEnumerable(Of IReadOnlyEntityType)

参数

model
IModel

要查找实体类型的模型。

type
Type

要查找的实体类型的类型。

返回

IReadOnlyCollection<Microsoft.EntityFrameworkCore.Metadata.Internal.EntityType>

找到的实体类型。

属性

适用于