• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • 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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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