Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

I need help with a LINQ query in my ASP.Net application


Hi experts
if I wanted to execute the query below using LINQ in my ASP.Net app with C# code behind, how would I do it in LINQ?  The query below is how I would execute it in SQL Server but how could I do this in LINQ?


SELECT
[School Year],
[Course Name]
FROM        
TBL_Course
where [CourseID] not in (select [CourseID] from TBL_Book where [BookID] NOT IN (14))



Thanks in advance,
mrotor
0
mainrotor
Asked:
mainrotor
2 Solutions
 
nishant joshiTechnology Development ConsultantCommented:

[your linqtable or list] .where(!x=>x.[CourseID].exist([TBL_Book linq table].where(y=>y.bookid !=14)).select();
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now