DatabaseColumn 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
一個用於逆向工程現有資料庫時使用的資料庫欄位簡單模型。
[System.Runtime.CompilerServices.Nullable(0)]
public class DatabaseColumn : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable
public class DatabaseColumn : Microsoft.EntityFrameworkCore.Infrastructure.Annotatable
[<System.Runtime.CompilerServices.Nullable(0)>]
type DatabaseColumn = class
inherit Annotatable
type DatabaseColumn = class
inherit Annotatable
Public Class DatabaseColumn
Inherits Annotatable
- 繼承
- 繼承
- 屬性
備註
更多資訊與範例請參閱 「逆向工程(支架)」現有資料庫及 EF Core 設計時服務 。
建構函式
| 名稱 | Description |
|---|---|
| DatabaseColumn() |
一個用於逆向工程現有資料庫時使用的資料庫欄位簡單模型。 |
屬性
| 名稱 | Description |
|---|---|
| Collation |
欄位排序,或 |
| Comment |
欄目評論,或者 |
| ComputedColumnSql |
該屬性所映射的計算欄位值是儲存在資料庫中,還是在讀取時計算。 |
| DefaultValue |
欄位的預設值,或 |
| DefaultValueSql |
欄位的預設約束,或 |
| IsNullable |
表示此欄位是否能包含 |
| IsReadOnly |
表示目前物件是否為唯讀。 (繼承來源 AnnotatableBase) |
| IsStored |
該屬性所映射的計算欄位值是儲存在資料庫中,還是在讀取時計算。 |
| Item[String] |
取得帶有名稱的值註解,若不存在則回 |
| Name |
數據行名稱。 |
| StoreType |
欄位的資料庫/儲存類型。 |
| Table |
包含此欄的表格。 |
| ValueGenerated |
表示資料庫何時會為此欄位產生值,或 |
方法
明確介面實作
擴充方法
| 名稱 | Description |
|---|---|
| AddAnnotations(IMutableAnnotatable, IEnumerable<IAnnotation>) |
為物件添加註解。 |
| AnnotationsToDebugString(IAnnotatable, Int32) |
取得物件上所有宣告註解的除錯字串。 |
| GetAnnotation(IAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetAnnotation(IMutableAnnotatable, String) |
取得帶有名稱的註解,若不存在則拋出。 |
| GetOrAddAnnotation(IMutableAnnotatable, String, String) |
取得帶有特定鍵的現有註解,或若不存在註解則新增。 |
| GetUnderlyingStoreType(DatabaseColumn) |
已淘汰.
取得該欄位底層的儲存/資料庫類型。 |
| SetOrRemoveAnnotation(IMutableAnnotatable, String, Object) |
設定以名字儲存的註解。 若已有指定名稱的註解存在,則會覆寫現有註解。 若 |
| SetUnderlyingStoreType(DatabaseColumn, String) |
已淘汰.
設定該欄位底層的儲存/資料庫類型。 |