Linq Join Where

學習記錄:

   var temp = (from user in dataContext.t_passport_userauthentication
                           where user.username == userName
                           join userInfo in dataContext.t_passport_userinformation
                           on user.userid equals userInfo.id
                           into tempTable
                           from tt in tempTable
                           where tt.identity_number==identifyNumber
                           select new { num=(tt.identity_number==null?"":tt.identity_number)});
                if (temp.Count()>0)
                {
                    return true;
                }


           



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章