linq联合查询例子-创新互联

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

创新互联成都企业网站建设服务,提供成都网站制作、成都网站设计网站开发,网站定制,建网站,网站搭建,网站设计,响应式网站建设,网页设计师打造企业风格网站,提供周到的售前咨询和贴心的售后服务。欢迎咨询做网站需要多少钱:18982081108

   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
               });

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


当前文章:linq联合查询例子-创新互联
标题网址:http://hbruida.cn/article/iodco.html