实体框架=>要改变列索引的列表?

时间:2018-09-20 00:11:36

标签: c# entity-framework json.net entity-framework-6

我有一个有趣的问题。

public class ExampleT
{
    [Key]
    public int Id { get; set; }
    [DisplayName("Okuyor")]
    [Required]
    public bool GoingSchool { get; set; }

    [DisplayName("Cinsiyet")]
    [Required]
    public bool Gender { get; set; }

    [DisplayName("Cinsiyet2")]
    [Required]
    [MaxLength(32)]
    public string Gender2 { get; set; }

    [DisplayName("İsim & Soyisim")]
    [Required]
    [MaxLength(128)]
    public string NameSurname { get; set; }

    [DisplayName("Yaş")]
    [Required]
    public int Age { get; set; }

    [DisplayName("Doğum tarihi")]
    [Required]
    [Column(TypeName = "Date")]
    public DateTime BirthDate { get; set; }

    [DisplayName("Açıklama")]
    [Required]
    [MaxLength(512)]
    public string Explanation { get; set; }

    [DisplayName("Anahtar kelimeler")]
    public virtual ICollection<KeywordsT> Keywords { get; set; }

    [DisplayName("Resim")]
    public virtual ICollection<ImageT> Images { get; set; }

    public ExampleT()
    {
        Keywords = new List<KeywordsT>();
        Images = new List<ImageT>();
    }
}

这是我的表,所以我选择一些行来获取它们。之后,将列表更改为Jarray(newtonsoft),并且我的Jarray的columns索引已更改。

Table's Properties

Object's wrong index of properties

那么如何更改索引?

0 个答案:

没有答案