title: Update a row adding a relationed row in EF (many-to-many)
body: <p>I have two entities: <code>Order</code> and <code>Item</code> and a many-to-many relationship between them. I have a method which receive the ItemId as parameter like this:</p>
  
  <pre><code>public void AddItems(int OrderId, int ItemId)
          {
              Item item = db.ItemSet.SingleOrDefault(i =&gt; i.Id == ItemId);
              Order order = db.OrderSet.SingleOrDefault(o =&gt; o.Id == OrderId);
  
              order.Items.Add(item);
              db.SaveChanges();
          }
  </code></pre>
  
  <p>There are a lot of rows in the ItemSet table, so the first query is a heavy one. Is there a way that I can add the item to the order without doing a query first on the "ItemSet" table? I mean, can I add the ItemId directly to the Order.Items or something like that?</p>