第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

誰能提供 linq 查詢

誰能提供 linq 查詢

C#
慕工程0101907 2021-08-22 15:46:15
現(xiàn)在我想LINQ查詢,如果像以下compIds是0001或技術(shù),然后我可以檢查與條件divisionCode ,如果compIds是0005或0006則不需要檢查與divisionCode這樣任何人都可以提供suggetioncompId可能增加取決于需求string[] compID = new string[] { "0002", "0001", "0005", "0006" };string[] divisionCode = new string[] { "01021159", "02013350", "02013483", "02013804", "02013375", "02013374", "02013380", "02013398", "02017379", "02013391", "02013444", "02013353", "02004458", "02013394" };var ACM = (from t1 in Entity.ApprovedContracts          join t2 in Entity.ApprovedResources          on t1.ApprovedResourceId equals t2.ResourceGeneralId          where compID.Contains(t1.OpuCode) && divisionCode.Contains(t1.DivisionCode)          select new          {                t1.OpuCode,                t1.DivisionCode,                t2.EnterpriseId,                t2.ResourceEmail          }).ToList();here
查看完整描述

2 回答

?
白板的微信

TA貢獻(xiàn)1883條經(jīng)驗(yàn) 獲得超3個(gè)贊

我認(rèn)為只需要添加更多條件......應(yīng)該是這樣的......


string[] compID = new string[] { "0002", "0001", "0005", "0006" };

string[] divisionCode = new string[] { "01021159", "02013350", "02013483", "02013804", "02013375", "02013374", "02013380", "02013398", "02017379", "02013391", "02013444", "02013353", "02004458", "02013394" };

var ACM = (from t1 in Entity.ApprovedContracts

      join t2 in Entity.ApprovedResources

      on t1.ApprovedResourceId equals t2.ResourceGeneralId

      where compID.Contains(t1.OpuCode) && (t1.OpuCode == "0005" || t1.OpuCode == "0006" || divisionCode.Contains(t1.DivisionCode)

      select new

      {

            t1.OpuCode,

            t1.DivisionCode,

            t2.EnterpriseId,

            t2.ResourceEmail

      }).ToList();


查看完整回答
反對(duì) 回復(fù) 2021-08-22
  • 2 回答
  • 0 關(guān)注
  • 188 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)