IEnumerable<Vw_ContactPeople> _mOldQuery = from people in vwContactPeopleList
                                                             where people.Dept == dept
                                                             orderby people.LoginName ascending
                                                             select people;


            IEnumerable<Tbl_SYS_Job> _mOldQuery = from job in oldJobList
                                                        where job.DeptNo == dept
                                                        select job;
            var entites = from a in _UniteOfWork.JCYJ11A
                          where a.JCYJ11A020.Contains(code)
                          group a by a.JCYJ11A050 into g
                          select new
                          {
                              总数 = g.Count(),
                              设备类型 = g.Key
                          };
            var result = entites.ToList();

            var entities = from a in _UniteOfWork.ZHBF01A
                           join b in _UniteOfWork.ZHBF03A on a.ZHBF01A010 equals b.ZHBF03A010 into ab
                           from abi in ab.DefaultIfEmpty()
                           join c in _UniteOfWork.ZHBF04A on abi.ZHBF03A010 equals c.ZHBF04A010 into abc
                           from abci in abc.DefaultIfEmpty()
                           join d in _UniteOfWork.ZHBF05A on abci.ZHBF04A010 equals d.ZHBF05A010 into abcd
                           from abcdi in abcd.DefaultIfEmpty()
                           join e in _UniteOfWork.ZHBF06A on abcdi.ZHBF05A010 equals e.ZHBF06A010 into abcde
                           from abcdei in abcde.DefaultIfEmpty()
                           select new
                           {
                               a,
                               abi,
                               abci,
                               abcdi,
                               abcdei
                           };

            var entities = from a in _UniteOfWork.ZHBF01A
                           join b in _UniteOfWork.WHAA03A on a.ZHBF01A050 equals b.WHAA03A000 into ab
                           from abi in ab.DefaultIfEmpty()
                           select new
                           {
                               a,
                               abi
                           };

 

 var entities = from a in _UniteOfWork.ZHDC01A
                               join b in _UniteOfWork.DISASTERS_V on a.ZHDC01A010 equals b.灾害体编号
                               select new
                               {
                                   a,
                                   b
                               };

 

posted on 2019-12-24 09:07  红磨坊后的白桦树  阅读(127)  评论(0编辑  收藏  举报