Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. LINQ
  4. Linq to Entity - SQL NOT IN

Linq to Entity - SQL NOT IN

Scheduled Pinned Locked Moved LINQ
databasecsharplinqtutorial
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    hhilzinger
    wrote on last edited by
    #1

    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

    H S J 3 Replies Last reply
    0
    • H hhilzinger

      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

      H Offline
      H Offline
      Henry Minute
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • H hhilzinger

        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

        S Offline
        S Offline
        SayreCC
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0
        • H hhilzinger

          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

          J Offline
          J Offline
          Judah Gabriel Himango
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups