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
2010-06-25 13:27:16