Reputation: 6605
I need to pull all values where the request type is any of the ones I have on the list.
from v in ctx.vEmailSents
where v.RequestType_ID == reqTypeID
group v by v.SentToLab_ID into g
select g.OrderByDescending(x => x.DateSent).FirstOrDefault() into lastV
select new
{
ClaimID = lastV.Claim_ID,
};
reqTypeID
is of type List<int>
.
How can I use it in Linq to get all records that are in that list?
Upvotes: 0
Views: 121
Reputation: 174289
You can do something like this:
where requestTypes.Contains(v.RequestType_ID)
requestTypes
would be the list you talked about.
Upvotes: 4