同时使用 join,where,order by.
UpdaterDbContext db = new UpdaterDbContext(); // 按 t_server 表的 seq ASC 排序,与 Form1 grid 顺序一致 var lstRst = from serv in db.t_server join itemServ in db.t_item_server.Where(x => x.item_id == _itemId) on serv.server_id equals itemServ.server_id orderby serv.seq select itemServ; lstItemServer = lstRst.ToList();
-