Click here to Skip to main content
15,889,834 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Select CatID,EN_Categori_Name from Categori where CatID not in (select Ust_CatID from Categori C where C.Ust_CatID = Categori.CatID)

What I have tried:

from Categoris in db.Categoris
where
!
(((from C in db.Categoris
where
C.Ust_CatID
select new {
C.Ust_CatID
}).First().Ust_CatID) == Categoris.CatID)
select new {
Categoris.CatID,
Categoris.EN_Categori_Name
}
Posted
Updated 18-Oct-18 3:38am
Comments
GKP1992 17-Oct-18 8:16am    
There are numerous tools on the internet that do it for you. Try to google search for once.

1 solution

Try:
C#
db.Categoris
    .Where(c1 => !db.Categoris.Any(c2 => c2.Ust_CatID == c1.CatID))
    .Select(c => new { c.CatID, c.EN_Categori_Name });
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900