Share via


MigrationsSqlGenerator.FindProperty(IModel, String, String, String) Method

Definition

Caution

Use model?.GetRelationalModel().FindTable().FindColumn()

Finds some IProperty mapped to the given column.

If multiple properties map to the same column, then the property returned is one chosen arbitrarily. The model validator ensures that all properties mapped to a given column have consistent configuration.

protected virtual Microsoft.EntityFrameworkCore.Metadata.IProperty FindProperty (Microsoft.EntityFrameworkCore.Metadata.IModel model, string schema, string tableName, string columnName);
[System.Obsolete("Use model?.GetRelationalModel().FindTable().FindColumn()")]
protected virtual Microsoft.EntityFrameworkCore.Metadata.IProperty FindProperty (Microsoft.EntityFrameworkCore.Metadata.IModel model, string schema, string tableName, string columnName);
[System.Obsolete("Use model?.GetRelationalModel().FindTable().FindColumn()")]
protected virtual Microsoft.EntityFrameworkCore.Metadata.IProperty? FindProperty (Microsoft.EntityFrameworkCore.Metadata.IModel? model, string? schema, string tableName, string columnName);
abstract member FindProperty : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string * string -> Microsoft.EntityFrameworkCore.Metadata.IProperty
override this.FindProperty : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string * string -> Microsoft.EntityFrameworkCore.Metadata.IProperty
[<System.Obsolete("Use model?.GetRelationalModel().FindTable().FindColumn()")>]
abstract member FindProperty : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string * string -> Microsoft.EntityFrameworkCore.Metadata.IProperty
override this.FindProperty : Microsoft.EntityFrameworkCore.Metadata.IModel * string * string * string -> Microsoft.EntityFrameworkCore.Metadata.IProperty
Protected Overridable Function FindProperty (model As IModel, schema As String, tableName As String, columnName As String) As IProperty

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 name of the table that contains the column.

columnName
String

The column name.

Returns

The property found, or null if no property maps to the given column.

Attributes

Applies to