+1  A: 

will that suit your needs?

var id = 
  (from task in stock.CTasks select new { task.id, task.workorder, jobseqno= task.jobseqno } )
  .Union(from card in stock.NonRoutineCards select new { card.id, card.workorderno, jobseqno = card.cardno })
  .Union(from card in stock.AdditionalWorkCards select new { card.id, card.workorderno, jobseqno = card.cardno })
  .Where(x => x.workorderno.TrimEnd() == ToNo && x.jobseqno == ToSeq)
  .FirstOrDefault();
torvin
it is not working :(
programmerist
could you be more precise?
torvin
i rearranged my codes wait me
programmerist
i add a picture and linq query
programmerist
that's because one of your field is named 'jobseqno' while the same field in another subquery is 'cardno'. specify field name in both cases explicitly:... new {task.ID, task.workorderno, Num = (int)task.jobseqno}... new { card.ID, card.workorderno, Num = card.cardno }... Where(... x.Num == ToSeq)
torvin
How can i solve it?
programmerist
i just told you in my previous comment :)
torvin
it is not workinq please help me it is important...
programmerist
ok, i edited my answer
torvin