成都创新互联网站制作重庆分公司

linq联合查询例子

where_model wm=new  where_model ();
    wm.kid = 58;
    IList mlist = BasicDataProxy.teacher_GetList(wm);

创新互联建站专注于企业营销型网站建设、网站重做改版、临海网站定制设计、自适应品牌网站建设、HTML5建站成都做商城网站、集团公司官网建设、外贸网站建设、高端网站制作、响应式网页设计等建站业务,价格优惠性价比高,为临海等各大城市提供网站开发制作服务。

    IList klist = BasicDataProxy.kin_roleinfo_GetList(wm);

    mlist = (from x in mlist
              where (x.title == "" && x.did != 1324 && x.userid>0)
              orderby x.did
              select x
              ).ToList();

    var list = (from x in mlist
                join p in klist on x.kid equals p.kid
                where (p.rid > 1000)
                select new kininfo()
                {

                    kid=x.kid,
                    rid=p.rid,
                    title=x.title,
                    uname=x.uname
                });

 

 

var list = (from x in mlist
                join p in klist on x.kid equals p.kid
                where (p.rid > 1000)
                group p by new {
                    x.kid,
                    x.uname
                }into g 
                select new kininfo()
                {

                    kid = g.Count(),
                    rid = g.Sum(x=>x.rid+g.Key.kid),
                    uname=g.Key.uname
                });


分享标题:linq联合查询例子
浏览路径:http://cxhlcq.com/article/pepjse.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部