EF2

 zkhisEntities db = new zkhisEntities();
            i++;
        var aa =    db.HJSFB.Select(u => new { name=u.SKH}).ToList();

            foreach (var item in aa)
            {
                this.Text = item.name; 
            }
        gridControl1.DataSource=    db.HJSFB.Where<HJSFB>(u => true).OrderBy<HJSFB,string>(u=>u.SKH).Skip((i-1)*10).Take(10).ToList(); ;

    dataGridView1.DataSource = db.Class1.Where(u => u.id==123).ToList().Select(u => {  return new { id=u.id}; }).ToList();

posted @ 2016-10-26 08:50  刀小爱  阅读(246)  评论(0编辑  收藏  举报