MigrationsSqlGenerator.FindEntityTypes(IModel, String, String) Method

Definition

Caution

Use model?.GetRelationalModel().FindTable()

Finds all IEntityTypes that are mapped to the given table.

protected virtual System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IEntityType> FindEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IModel model, string schema, string tableName);
[System.Obsolete("Use model?.GetRelationalModel().FindTable()")]
protected virtual System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IEntityType> FindEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IModel model, string schema, string tableName);
[System.Obsolete("Use model?.GetRelationalModel().FindTable()")]
protected virtual System.Collections.Generic.IEnumerable<Microsoft.EntityFrameworkCore.Metadata.IEntityType>? FindEntityTypes (Microsoft.EntityFrameworkCore.Metadata.IModel? model, string? schema, string tableName);
abstract member FindEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string -> seq<Microsoft.EntityFrameworkCore.Metadata.IEntityType>
override this.FindEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string -> seq<Microsoft.EntityFrameworkCore.Metadata.IEntityType>
[<System.Obsolete("Use model?.GetRelationalModel().FindTable()")>]
abstract member FindEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string -> seq<Microsoft.EntityFrameworkCore.Metadata.IEntityType>
override this.FindEntityTypes : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string -> seq<Microsoft.EntityFrameworkCore.Metadata.IEntityType>
Protected Overridable Function FindEntityTypes (model As IModel, schema As String, tableName As String) As IEnumerable(Of IEntityType)

Parameters

model
IModel

The target model which may be null if the operations exist without a model.

schema
String

The schema that contains the table, or null to use the default schema.

tableName
String

The table name.

Returns

The list of types, which may be empty if no types are mapped to the given table.

Attributes

Applies to