linq联合查询例子-成都快上网建站

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联合查询例子
文章URL:http://kswjz.com/article/pepjse.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流