共用方式為


AddColumnOperation 類別

定義

MigrationOperation要加入新資料行的 。

public class AddColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.MigrationOperation
public class AddColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation
[System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} ADD {Name}")]
public class AddColumnOperation : Microsoft.EntityFrameworkCore.Migrations.Operations.ColumnOperation
type AddColumnOperation = class
    inherit MigrationOperation
type AddColumnOperation = class
    inherit ColumnOperation
[<System.Diagnostics.DebuggerDisplay("ALTER TABLE {Table} ADD {Name}")>]
type AddColumnOperation = class
    inherit ColumnOperation
Public Class AddColumnOperation
Inherits MigrationOperation
Public Class AddColumnOperation
Inherits ColumnOperation
繼承
繼承
繼承
屬性

備註

如需詳細資訊和範例 ,請參閱資料庫移轉

建構函式

AddColumnOperation()

MigrationOperation要加入新資料行的 。

屬性

ClrType

MigrationOperation要加入新資料行的 。

ClrType

對應至資料行之屬性或屬性的 CLR Type

(繼承來源 ColumnOperation)
Collation

這個資料行的定序, null 如果尚未明確設定,則為 。

(繼承來源 ColumnOperation)
ColumnType

MigrationOperation要加入新資料行的 。

ColumnType

資料行的存放區類型,例如 'Nvarchar (max) '。

(繼承來源 ColumnOperation)
Comment

此資料行的批註

(繼承來源 ColumnOperation)
ComputedColumnSql

MigrationOperation要加入新資料行的 。

ComputedColumnSql

如果未計算資料行, null 則為用來計算資料行值的 SQL 運算式。

(繼承來源 ColumnOperation)
DefaultValue

MigrationOperation要加入新資料行的 。

DefaultValue

插入的資料列預設值,沒有這個資料行的明確值,如果沒有 null 預設值,則為 。

(繼承來源 ColumnOperation)
DefaultValueSql

MigrationOperation要加入新資料行的 。

DefaultValueSql

建立資料行時要當做預設條件約束使用的 SQL 運算式,如果沒有 null 預設條件約束,則為 。

(繼承來源 ColumnOperation)
IsDestructiveChange

指出作業是否可能導致資料庫中的資料遺失。

(繼承來源 MigrationOperation)
IsFixedLength

指出資料行是否受限於固定長度的資料。

(繼承來源 ColumnOperation)
IsNullable

MigrationOperation要加入新資料行的 。

IsNullable

指出資料行是否可以儲存 null 值。

(繼承來源 ColumnOperation)
IsReadOnly

指出目前物件是否為唯讀。

(繼承來源 AnnotatableBase)
IsRowVersion

MigrationOperation要加入新資料行的 。

IsRowVersion

指出此資料行是否做為SQL Server上 'rowversion'/'timestamp' 資料行相同的自動並行權杖。

(繼承來源 ColumnOperation)
IsStored

這個屬性所對應的計算資料行值是否儲存在資料庫中,或是在讀取時計算。

(繼承來源 ColumnOperation)
IsUnicode

MigrationOperation要加入新資料行的 。

IsUnicode

指出資料行是否可以包含 Unicode 資料,或 null 如果未指定或不適用於此資料行類型,則為 。

(繼承來源 ColumnOperation)
Item[String]

取得具有指定名稱的值批註,如果不存在,則傳 null 回 。

(繼承來源 Annotatable)
MaxLength

MigrationOperation要加入新資料行的 。

MaxLength

資料行可以儲存的資料量上限, null 如果未指定或不適用於此資料行類型,則為 。

(繼承來源 ColumnOperation)
Name

資料行名稱。

Name

資料行名稱。

(繼承來源 ColumnOperation)
Precision

資料行可以儲存的最大位數,如果未 null 指定或不適用於此資料行類型,則為 。

(繼承來源 ColumnOperation)
Scale

資料行可以儲存的小數位數上限, null 如果未指定或不適用於此資料行類型,則為 。

(繼承來源 ColumnOperation)
Schema

包含資料表的架構,如果 null 應該使用預設架構,則為 。

Schema

包含資料表的架構,如果 null 應該使用預設架構,則為 。

(繼承來源 ColumnOperation)
Table

要加入資料行的資料表。

Table

包含資料行的資料表。

(繼承來源 ColumnOperation)

方法

AddAnnotation(String, Annotation)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 Annotatable)
AddAnnotation(String, Object)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 Annotatable)
AddAnnotations(IEnumerable<IAnnotation>)

將批註加入至這個物件。

(繼承來源 AnnotatableBase)
AddAnnotations(IReadOnlyDictionary<String,Object>)

將批註加入至這個物件。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Annotation)

將執行時間批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotation(String, Object)

將執行時間批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IEnumerable<Annotation>)

將執行時間批註加入至這個物件。

(繼承來源 AnnotatableBase)
AddRuntimeAnnotations(IReadOnlyDictionary<String,Object>)

將執行時間批註加入至這個物件。

(繼承來源 AnnotatableBase)
CreateAnnotation(String, Object)

建立新的批註。

(繼承來源 Annotatable)
CreateRuntimeAnnotation(String, Object)

建立新的執行時間批註。

(繼承來源 AnnotatableBase)
EnsureMutable()

如果模型是唯讀的,則會擲回 。

(繼承來源 Annotatable)
EnsureReadOnly()

如果模型不是唯讀,則會擲回 。

(繼承來源 Annotatable)
FindAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則傳 null 回 。

(繼承來源 Annotatable)
FindRuntimeAnnotation(String)

取得具有指定名稱的執行時間批註,如果不存在,則傳 null 回 。

(繼承來源 AnnotatableBase)
GetAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

(繼承來源 AnnotatableBase)
GetAnnotations()

取得目前 物件上的所有批註。

(繼承來源 Annotatable)
GetOrAddAnnotation(String, Object)

將批註加入至這個物件,如果具有指定名稱的注釋已經存在,則傳回現有的批註。

(繼承來源 Annotatable)
GetOrAddRuntimeAnnotationValue<TValue,TArg>(String, Func<TArg,TValue>, TArg)

取得具有指定名稱的執行時間注釋值,如果不存在,請加以新增。

(繼承來源 AnnotatableBase)
GetRuntimeAnnotations()

取得目前 物件上的所有執行時間批註。

(繼承來源 AnnotatableBase)
OnAnnotationSet(String, Annotation, Annotation)

設定或移除批註時呼叫。

(繼承來源 Annotatable)
RemoveAnnotation(String)

從這個 物件中移除指定的注釋。

(繼承來源 Annotatable)
RemoveRuntimeAnnotation(String)

從這個 物件中移除指定的執行時間批註。

(繼承來源 AnnotatableBase)
SetAnnotation(String, Annotation)

設定儲存在指定索引鍵底下的注釋。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

(繼承來源 Annotatable)
SetAnnotation(String, Annotation, Annotation)

設定儲存在指定索引鍵底下的注釋。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

(繼承來源 Annotatable)
SetAnnotation(String, Object)

設定儲存在指定索引鍵底下的注釋。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

(繼承來源 Annotatable)
SetRuntimeAnnotation(String, Annotation, Annotation)

設定儲存在指定索引鍵下的執行時間批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

(繼承來源 AnnotatableBase)
SetRuntimeAnnotation(String, Object)

設定儲存在指定索引鍵下的執行時間批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

(繼承來源 AnnotatableBase)

明確介面實作

IAnnotatable.AddRuntimeAnnotation(String, Object)

將執行時間批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 AnnotatableBase)
IAnnotatable.FindAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則傳回 null。

(繼承來源 Annotatable)
IAnnotatable.FindRuntimeAnnotation(String)

取得具有指定名稱的執行時間批註,如果不存在,則傳 null 回 。

(繼承來源 AnnotatableBase)
IAnnotatable.GetAnnotations()

取得目前 物件上的所有批註。

(繼承來源 Annotatable)
IAnnotatable.GetRuntimeAnnotations()

取得目前 物件上的所有執行時間批註。

(繼承來源 AnnotatableBase)
IAnnotatable.RemoveRuntimeAnnotation(String)

從這個 物件中移除指定的執行時間批註。

(繼承來源 AnnotatableBase)
IAnnotatable.SetRuntimeAnnotation(String, Object)

設定儲存在指定索引鍵下的執行時間批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。

(繼承來源 AnnotatableBase)
IMutableAnnotatable.AddAnnotation(String, Object)

將批註加入至這個物件。 如果具有指定名稱的注釋已經存在,則會擲回 。

(繼承來源 Annotatable)
IMutableAnnotatable.RemoveAnnotation(String)

從這個 物件中移除指定的注釋。

(繼承來源 Annotatable)
IMutableAnnotatable.SetOrRemoveAnnotation(String, Object)

設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。 如果 null 已提供,則移除現有的批註。

(繼承來源 Annotatable)
IReadOnlyAnnotatable.FindAnnotation(String)

取得具有指定名稱的注釋,如果不存在,則傳 null 回 。

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.GetAnnotations()

取得目前 物件上的所有批註。

(繼承來源 AnnotatableBase)
IReadOnlyAnnotatable.Item[String]

取得具有指定名稱的注釋值,如果不存在,則傳 null 回 。

(繼承來源 AnnotatableBase)

擴充方法

AnnotationsToDebugString(IAnnotatable, Int32)

取得 物件上宣告之所有批註的偵錯字串。

GetAnnotation(IAnnotatable, String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>)

將批註加入物件。

GetAnnotation(IMutableAnnotatable, String)

取得具有指定名稱的注釋,如果不存在,則會擲回。

GetOrAddAnnotation(IMutableAnnotatable, String, String)

取得具有指定索引鍵的現有注釋,如果不存在,則加入新的批註。

SetOrRemoveAnnotation(IMutableAnnotatable, String, Object)

設定儲存在指定名稱下的批註。 如果具有指定名稱的注釋已經存在,則覆寫現有的注釋。 如果 null 已提供,則移除現有的批註。

適用於