Share via


RelationalPropertyBuilderExtensions.HasColumnName Method

Definition

Overloads

HasColumnName(IConventionPropertyBuilder, String, StoreObjectIdentifier, Boolean)

Configures the column that the property maps to in a particular table-like store object.

HasColumnName(PropertyBuilder, String)

Configures the column that the property maps to when targeting a relational database.

HasColumnName(IConventionPropertyBuilder, String, Boolean)

Configures the column that the property maps to when targeting a relational database.

HasColumnName<TProperty>(PropertyBuilder<TProperty>, String)

Configures the column that the property maps to when targeting a relational database.

HasColumnName(IConventionPropertyBuilder, String, StoreObjectIdentifier, Boolean)

Configures the column that the property maps to in a particular table-like store object.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder HasColumnName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string name, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? HasColumnName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string? name, in Microsoft.EntityFrameworkCore.Metadata.StoreObjectIdentifier storeObject, bool fromDataAnnotation = false);
static member HasColumnName : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * string * StoreObjectIdentifier * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
<Extension()>
Public Function HasColumnName (propertyBuilder As IConventionPropertyBuilder, name As String, ByRef storeObject As StoreObjectIdentifier, Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

name
String

The name of the column.

storeObject
StoreObjectIdentifier

The identifier of the store object.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

HasColumnName(PropertyBuilder, String)

Configures the column that the property maps to when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasColumnName (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string name);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder HasColumnName (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder propertyBuilder, string? name);
static member HasColumnName : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder
<Extension()>
Public Function HasColumnName (propertyBuilder As PropertyBuilder, name As String) As PropertyBuilder

Parameters

propertyBuilder
PropertyBuilder

The builder for the property being configured.

name
String

The name of the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

HasColumnName(IConventionPropertyBuilder, String, Boolean)

Configures the column that the property maps to when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder HasColumnName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string name, bool fromDataAnnotation = false);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder? HasColumnName (this Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder propertyBuilder, string? name, bool fromDataAnnotation = false);
static member HasColumnName : Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder * string * bool -> Microsoft.EntityFrameworkCore.Metadata.Builders.IConventionPropertyBuilder
<Extension()>
Public Function HasColumnName (propertyBuilder As IConventionPropertyBuilder, name As String, Optional fromDataAnnotation As Boolean = false) As IConventionPropertyBuilder

Parameters

propertyBuilder
IConventionPropertyBuilder

The builder for the property being configured.

name
String

The name of the column.

fromDataAnnotation
Boolean

Indicates whether the configuration was specified using a data annotation.

Returns

The same builder instance if the configuration was applied, null otherwise.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to

HasColumnName<TProperty>(PropertyBuilder<TProperty>, String)

Configures the column that the property maps to when targeting a relational database.

public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> HasColumnName<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string name);
public static Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> HasColumnName<TProperty> (this Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty> propertyBuilder, string? name);
static member HasColumnName : Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property> * string -> Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<'Property>
<Extension()>
Public Function HasColumnName(Of TProperty) (propertyBuilder As PropertyBuilder(Of TProperty), name As String) As PropertyBuilder(Of TProperty)

Type Parameters

TProperty

The type of the property being configured.

Parameters

propertyBuilder
PropertyBuilder<TProperty>

The builder for the property being configured.

name
String

The name of the column.

Returns

The same builder instance so that multiple calls can be chained.

Remarks

See Modeling entity types and relationships for more information and examples.

Applies to