共用方式為


RelationalPropertyBuilderExtensions.HasColumnName 方法

定義

多載

HasColumnName(IConventionPropertyBuilder, String, StoreObjectIdentifier, Boolean)

設定屬性對應至特定資料表類似存放區物件的資料行。

HasColumnName(PropertyBuilder, String)

設定屬性在以關係資料庫為目標時所對應的資料行。

HasColumnName(IConventionPropertyBuilder, String, Boolean)

設定屬性在以關係資料庫為目標時所對應的資料行。

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

設定屬性在以關係資料庫為目標時所對應的資料行。

HasColumnName(IConventionPropertyBuilder, String, StoreObjectIdentifier, Boolean)

來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs

設定屬性對應至特定資料表類似存放區物件的資料行。

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

name
String

資料行名稱。

storeObject
StoreObjectIdentifier

存放區物件的識別碼。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

如果套用組態,則為相同的產生器實例, null 否則為 。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於

HasColumnName(PropertyBuilder, String)

來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs

設定屬性在以關係資料庫為目標時所對應的資料行。

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

參數

propertyBuilder
PropertyBuilder

要設定之屬性的產生器。

name
String

資料行名稱。

傳回

相同的產生器實例,以便鏈結多個呼叫。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於

HasColumnName(IConventionPropertyBuilder, String, Boolean)

來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs

設定屬性在以關係資料庫為目標時所對應的資料行。

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

參數

propertyBuilder
IConventionPropertyBuilder

要設定之屬性的產生器。

name
String

資料行名稱。

fromDataAnnotation
Boolean

指出是否使用資料批註來指定組態。

傳回

如果套用組態,則為相同的產生器實例, null 否則為 。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於

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

來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs
來源:
RelationalPropertyBuilderExtensions.cs

設定屬性在以關係資料庫為目標時所對應的資料行。

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)

類型參數

TProperty

正在設定之屬性的型別。

參數

propertyBuilder
PropertyBuilder<TProperty>

要設定之屬性的產生器。

name
String

資料行名稱。

傳回

相同的產生器實例,以便鏈結多個呼叫。

備註

如需詳細資訊和範例,請參閱 模型化實體類型和關聯 性。

適用於