I have a query from sql but I can't seem to make it work in linq here is the query from sql server:
SELECT MembersBU.MemberID, MembersBU.MemberFirst, MembersBU.MemberLast,
MembersBU.MemberEmail, MembersBU.ValidEmail,
MembersBU.EmailCap
FROM groupMembers INNER JOIN
MembersBU ON groupMembers.MemID = MembersBU.MemberID
WHERE (groupMembers.groupID = 3) AND (MembersBU.EmailCap = 1)
and here is the linq query:
var query = from M in MembersBUs
join GM in GroupMembers on M.MemberID equals GM.MemID
where (GM.GroupID = 3) & (M.EmailCap = 1)
select new {M.MemberID, M.MemberFirst, M.MemberLast,
M.MemberEmail, M.ValidEmail, M.EmailCap};
any help is appreciated.