GFrizzle击败了我。但是这是一个C#版本
var projectsMemberWorkedOn = from p in Projects join projectMember in ProjectMembers on p.ProjectId equals projectMember.ProjectId where projectMember.MemberId == "a45bd16d-9be0-421b-b5bf-143d334c8155" select p;
作为奖励,还有纯LINQ方法链版本:
var projectsMemberWorkedOn = Projects.Join( ProjectMembers, p => p.ProjectId, projectMember => projectMember.ProjectId, ( p, projectMember ) => new { p, projectMember } ) .Where( @t => @t.projectMember.MemberId == "a45bd16d-9be0-421b-b5bf-143d334c8155" ) .Select(@t => @t.p );
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)