最好每个点讲下啊.IQueryable cust10 = (from c in customersjoin p in db.zz1 on c.zzlxm equals p.zz2where c.xh == xhorderby c.idselect new { .}

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 04:15:40
最好每个点讲下啊.IQueryable cust10 = (from c in customersjoin p in db.zz1 on c.zzlxm equals p.zz2where c.xh == xhorderby c.idselect new { .}

最好每个点讲下啊.IQueryable cust10 = (from c in customersjoin p in db.zz1 on c.zzlxm equals p.zz2where c.xh == xhorderby c.idselect new { .}
最好每个点讲下啊.
IQueryable cust10 = (from c in customers
join p in db.zz1 on c.zzlxm equals p.zz2
where c.xh == xh
orderby c.id
select new { .}

最好每个点讲下啊.IQueryable cust10 = (from c in customersjoin p in db.zz1 on c.zzlxm equals p.zz2where c.xh == xhorderby c.idselect new { .}
首先这是linq的语法,具体的语法你自己去查咯.我给你说说查询的结果是什么意思.从上面语句看,数据库里面应该有customers、zz1两个表,要查的是customers的zzlxm=zz1的zz2的行相连接后,再筛选customers的xh=xh(已知量)的行,并以customers的id排序.new { .}里面是要查出哪些字段.