Think of it! You don't need to use
IN
, you have to use
Join[
^]! Why? It's quite obvious: above statement get only that tickets which
TicketStatusId
field is equal to
TreeOfKnowledgeDataTicketStatusId
.
var qry = from ticket in Tickets
join knowdata in TreeOfKnowledgeDatas on ticket.TicketStatusId equals knowdata.TicketStatusId
select ticket;
If you would like to get data from both "tables", try this:
var qry = from ticket in Tickets
join knowdata in TreeOfKnowledgeDatas on ticket.TicketStatusId equals knowdata.TicketStatusId
select new
{
statid = ticket.TicketStatusId,
kbd = knowdata.AnotherField
};