How do you sort an EntitySet

后端 未结 4 783
醉梦人生
醉梦人生 2021-01-24 14:33

The MSDN documentation states that an EntitySet implements IBindingList

(see \'Binding to EntitySets\' at http://msdn.microsoft.com/en-us/library/bb546190.aspx)

4条回答
  •  说谎
    说谎 (楼主)
    2021-01-24 15:03

    OrderByDecending!

    var tags = objContext.Tags;
    gvTester.DataSource = tags.OrderByDescending(x => x.TagID); ;
    gvTester.DataBind();
    

提交回复
热议问题