• linq join 左连接 leftjoin 多个on条件 where 条件


    var haveChange = from newScore in newScoreList
                                             join oldScore in oldScoreList
                                                 on
                                                 new{newScore.ExamId,newScore.StudentId,newScore.Subject,newScore.ClassId} equals
                                                 new{oldScore.ExamId,oldScore.StudentId,oldScore.Subject,oldScore.ClassId}
                                             where newScore.Score != oldScore.Score
                                             select newScore;

     

    参考

    var query= from cc in COPTC
               join cd in COPTD
               on new {cc.TC001,cc.TC002} equals new{ cd.TD001,cd.TD002} 
               into m
               from n in m.DefaultIfEmpty()
               join ma in MOCTA
               on new{cd.TD001, cd.TD002,cd.TD003 } equals new{ ma.TA026,ma.TA027,ma.TA028}
                
               where new char[]{'Y','y'}.Contains(ma.TA013) 
                  && new char[]{'Y','y'}.Contains(cc.TC027)
                  && Convert.ToDateTime(ma.TA003) > Convert.ToDateTime("2010-07-20")
                  && Convert.ToDateTime(ma.TA003) < Convert.ToDateTime("2010-12-31")
               select new 
               {
                  cc,
                  cd
               };
  • 相关阅读:
    爬虫
    Django
    python多线程
    python基础
    深度学习_1_Tensorflow_1
    人工智能_5_决策树_随机森林
    人工智能_4_k近邻_贝叶斯_模型评估
    人工智能_3_机器学习_概述
    Python re 模块
    Python函数式编程
  • 原文地址:https://www.cnblogs.com/joeylee/p/3711654.html
Copyright © 2020-2023  润新知