ColumnAttribute.Order Vlastnost

Definice

Získá nebo nastaví pořadí založené na nule sloupce, na který je vlastnost mapována.

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

Hodnota vlastnosti

Pořadí sloupce.

Poznámky

Zadané pořadí je relativní vzhledem k hodnotám pořadí zadaným u jiných vlastností třídy. Například s ohledem na následující definici se sloupec Line1 zobrazí před Line2a Line2 zobrazí se před 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; }  
}  

Platí pro