ColumnAttribute.Order 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定此屬性所對應之以零為基底的資料行順序。
public:
property int Order { int get(); void set(int value); };
public int Order { get; set; }
member this.Order : int with get, set
Public Property Order As Integer
屬性值
資料行的順序。
備註
指定的順序相對於 類別中其他屬性所指定的順序值。 例如,假設有下列定義,數據行 Line1
會出現在 之前 Line2
,並 Line2
出現在 之前 Country
。
public class Address
{
[Column(Order = 1)]
public string Line1 { get; set; }
[Column(Order = 4)]
public string Line2 { get; set; }
[Column(Order = 17)]
public string Country { get; set; }
}
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應