title: LINQ to Entities - WHERE clause to exclude Partially Shipped Orders in my example
body: <p>I have an Order table. An Order can have multiple items in it, with each item shipping at different times. I want to get the list of all Orders which <em>excludes</em> partially shipped or orders. In other words, I need to get the list of all orders that are <em>completely</em> shipped. I may know how to do this in T-SQL. But I'm trying to accomplish this with LINQ-to-Entities (EF4/.Net 4.0/C#).</p>
  
  <p>Consider the following Data: </p>
  
  <pre><code>PK      OrderID      Item       Status
  1       00001        TV         Shipped
  2       00001        TABLET     Shipped
  3       00002        BLURAYPL   Not Shipped
  4       00002        MOBILEPH   Shipped
  5       00002        XBOX       Shipped
  6       00003        PAPER      Shipped
  7       00003        PENCIL     Shipped
  </code></pre>
  
  <p>The goal is to get 00001 and 00003 as output. </p>
  
  <p>Here is what I have so far, obviously simplified : </p>
  
  <pre><code>using (MyDBEntities dbcontext = new MyDBEntities())
  {
    var WashingtonClients = from a in dbcontext.CustomerMasterTable
                      where a.City == "Washington"
                      select a.CustomerID;
  
   var ShippedOrdersToWashingtonClients = from o in dbcontext.OrderDetail
                       where WashingtonClients.Contains(o.CustomerID)
                       &amp;&amp; o.Status.ToUpper() == "SHIPPED"
                       //how to exclude Partially Shipped orders here???
                       select o.OrderID;
  }
  </code></pre>
  
  <p>How to frame the second query in such a way that it excludes orders that have even a single unshipped item in it? Many thanks for your time. </p>