語言

ColumnBuilder<TProperty> 類別

定義

這個類別的實例會在使用 ModelBuilder API 時從方法回傳,且並非設計成直接在應用程式程式碼中建構。

[System.Runtime.CompilerServices.Nullable(0)]
public class ColumnBuilder<TProperty> : Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty>>
public class ColumnBuilder<TProperty> : Microsoft.EntityFrameworkCore.Metadata.Builders.ColumnBuilder, Microsoft.EntityFrameworkCore.Infrastructure.IInfrastructure<Microsoft.EntityFrameworkCore.Metadata.Builders.PropertyBuilder<TProperty>>
[<System.Runtime.CompilerServices.Nullable(0)>]
type ColumnBuilder<'Property> = class
    inherit ColumnBuilder
    interface IInfrastructure<PropertyBuilder<'Property>>
type ColumnBuilder<'Property> = class
    inherit ColumnBuilder
    interface IInfrastructure<PropertyBuilder<'Property>>
Public Class ColumnBuilder(Of TProperty)
Inherits ColumnBuilder
Implements IInfrastructure(Of PropertyBuilder(Of TProperty))

類型參數

TProperty
繼承
ColumnBuilder<TProperty>
屬性
實作

建構函式

名稱 Description
ColumnBuilder<TProperty>(StoreObjectIdentifier, PropertyBuilder<TProperty>)

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

屬性

名稱 Description
InternalOverrides

這是一個內部 API,支援 Entity Framework Core 基礎架構,且不受公開 API 相同的相容性標準約束。 該內容可能會在任何新聞稿中未經通知而更改或移除。 你應該只在程式碼中直接使用它,並且要非常謹慎,並且要知道這樣做可能會導致更新到新的 Entity Framework Core 版本時應用程式失敗。

(繼承來源 ColumnBuilder)
Overrides

正在設定特定表格的覆蓋。

(繼承來源 ColumnBuilder)

方法

名稱 Description
HasAnnotation(String, Object)

在屬性上新增或更新特定資料表的註解。 如果已有標註中指定 annotation 該鍵的標註,其值會被更新。

HasColumnName(String)

設定屬性在指向關聯式資料庫時所對應的欄位。

明確介面實作

名稱 Description
IInfrastructure<PropertyBuilder<TProperty>>.Instance

這個類別的實例會在使用 ModelBuilder API 時從方法回傳,且並非設計成直接在應用程式程式碼中建構。

IInfrastructure<PropertyBuilder>.Instance

這個類別的實例會在使用 ModelBuilder API 時從方法回傳,且並非設計成直接在應用程式程式碼中建構。

(繼承來源 ColumnBuilder)

擴充方法

名稱 Description
GetInfrastructure<T>(IInfrastructure<T>)

從一個被隱藏的屬性中取得價值 IInfrastructure<T>。

此方法通常由資料庫提供者(及其他擴充)使用。 它通常不被用於應用程式程式碼中。

UseAutoincrement(ColumnBuilder)

設定屬性以使用 SQLite AUTOINCREMENT 功能來產生新實體的值,針對 SQLite 進行目標。 此方法將性質設定為 OnAdd。

UseIdentityColumn(ColumnBuilder, Int64, Int32)

設定鍵欄位以使用 SQL Server 的 IDENTITY 功能,在針對 SQL Server 時產生新實體的值。 此方法將性質設定為 OnAdd。

UseIdentityColumn<TProperty>(ColumnBuilder<TProperty>, Int64, Int32)

設定鍵欄位以使用 SQL Server 的 IDENTITY 功能,在針對 SQL Server 時產生新實體的值。 此方法將性質設定為 OnAdd。

適用於