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


           



你可能感兴趣的:(Linq Join Where)