Posted By

housecor on 01/20/11


Versions (?)

LINQ not in statement

 / Published in: C#


Note that .Except is a great option too, but only if you're dealing with a list of value types (it doesn't work with complex types unless you implement an iEqualityOperator)

  1. from c in dc.Customers
  2. where !(from o in dc.Orders
  3. select o.CustomerID)
  4. .Contains(c.CustomerID)
  5. select c;

Report this snippet  

You need to login to post a comment.