How do I convert the following query into linq to sql query?
select
invoice.id, web_users.id, web_users.first_name, web_users.last_name,web_users.email_address
from attendees,web_users
join invoice where attendees.invoice_id=invoice.id and invoice.seminar_id=6 and attendees.web_user_id=web_users.id
this is what I had but it is throwing an error:
from att in context.Attendees
from webUsers in context.WebUsers
join invoice in context.Invoice
on att.InvoiceID equals invoice.ID
where invoice.SeminarID == seminarId &&
webUsers.ID == att.WebUserID
select new
{
webUsers.FirstName,
att.InvoiceID
};
Thanks in advance.
Try: