Linq to Entity - SQL NOT IN
-
I need to know how to structure a LINQ to EF query. In SQL I would do something like this Select * from dbo.Person where Person.Name NOT IN (select name from dbo.BadBoyList) 1. I want a list of Person objects 2. The list must be filtered based on the persons name i.e. using a NOT IN or EXCLUDE statement of some sort. Much appreciated H
-
I need to know how to structure a LINQ to EF query. In SQL I would do something like this Select * from dbo.Person where Person.Name NOT IN (select name from dbo.BadBoyList) 1. I want a list of Person objects 2. The list must be filtered based on the persons name i.e. using a NOT IN or EXCLUDE statement of some sort. Much appreciated H
I know very little LINQ, so you will have to judge whether this[^] link to a StackOverflow thread is relevant.
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
modified on Monday, May 4, 2009 9:22 AM
-
I need to know how to structure a LINQ to EF query. In SQL I would do something like this Select * from dbo.Person where Person.Name NOT IN (select name from dbo.BadBoyList) 1. I want a list of Person objects 2. The list must be filtered based on the persons name i.e. using a NOT IN or EXCLUDE statement of some sort. Much appreciated H
Hi, you can visit www.codeinlinq.blogspot.com
Hope this one can help. Thanks Hi, Please select Good Question if my answer are fit to your Question.
-
I need to know how to structure a LINQ to EF query. In SQL I would do something like this Select * from dbo.Person where Person.Name NOT IN (select name from dbo.BadBoyList) 1. I want a list of Person objects 2. The list must be filtered based on the persons name i.e. using a NOT IN or EXCLUDE statement of some sort. Much appreciated H
Have you tried the Except method? I'm not sure how Linq-to-Entities maps that, but I assume it's smart enough to do it well.
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon Judah Himango