Ordering Column Attributes in Entity Framework
问题 I am using Entity Framework in my application,so I have mapped my property objects to database objects. The property objects have been defined using Column attribute. Now,I want to order them,but I can't find the property in Column Attribute for Order. I have included System.ComponentModel.DataAnnotations,but still not getting it Thanks in advance 回答1: just use : using System.ComponentModel.DataAnnotations.Schema; Code : [Column("Name" , Order = 1)] public int UserName { get; set; } Notice :