I have a Table "Fundraiser_Participants" where I have people that participate in fundraisers. I also have another table "Fundraiser_Orders" where I have a Foreign Key back to Fundraiser Participants where I store all the participant's orders.
I was wanting to do a "search" on my page for any "item" ordered to display the person who ordered them. But I can't figure out how to do the where clause.
Thoughts?
I was thinking something like this but just can't figure it out:
var query = _fundraiserParticipantsReposity.Table;
query = from p in query
join psa in _fundraiserFundraiserOrderReposity.Table on p.Id equals psa.FK_FundraiserParticipant
where p.FK_FundraiserID == fid
&& psa.GraphicLetter.Contains(SearchGraphicLetter)
orderby p.Id descending
select p;
if (SearchGraphicLetter != "")
{
query = query.Where(c => _fundraiserFundraiserOrderReposity.Table.Where(psa => psa.GraphicLetter.Contains(SearchGraphicLetter)).Join(c.Id, psa.);
}