I am trying to do a subquery and union to fetch some records. Below is my sql. How can I write the same in LINQ.
select * from tblID Where id = 1 and Desc not in(select desc from tblID where status like 'Detail')
union
select distinct * from tblID where id = 1 and status like 'Detail'
My goal:
id desc status
1 A Detail
2 A Detail1
I want to fetch record with detail1 while executing. Please help!