ColumnAttribute.Order Właściwość

Definicja

Pobiera lub ustawia kolejność zerową kolumny, do której jest mapowana właściwość.

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

Wartość właściwości

Kolejność kolumny.

Uwagi

Określona kolejność jest względna względem wartości kolejności określonych we innych właściwościach w klasie. Na przykład, biorąc pod uwagę następującą definicję, kolumna Line1 jest wyświetlana przed Line2elementem , a Line2 następnie jest wyświetlana przed 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; }  
}  

Dotyczy