title: How to update a collection of navigation property In Web API 2 with OData v4?
body: <p>I'm developing a client server application using Asp.Net WebApi 2.2, Odata V4.
  I have generated a Odata v4 proxy class for consume WebApi Odata services in a WPF Application.</p>
  
  <p>I have following models in my solution:</p>
  
  <pre><code>public class Customer
  {
      public Customer
      {
          Orders = new List&lt;Order&gt;();
      }
      public int Id{get; set;}
      public string CustomerName{get; set;}
      public virtual List&lt;Order&gt; Orders{get; set;}
  }
  
  public class Order
  {
      public int Id{get; set;}
      public string Part{get; set;}
      public virtual Customer Customer{get; set;}
  }
  </code></pre>
  
  <p>There is a one to many relationship exist between Customer and Orders.
  Orders is defined as a navigation property in Customer entity;</p>
  
  <p>In the Odata client I have following code to get Customer record.</p>
  
  <pre><code>Customer customer = context.Customers.ByKey(1).Expand("Orders").GetValue();
  </code></pre>
  
  <p>It's possible to get, moidify and save tha changes of properties of customer entity.</p>
  
  <pre><code>context.UpdateObject(Customer);
  context.SaveChanges();
  </code></pre>
  
  <p>But the changes made in navigation property (<em>Orders</em>) got lost when saving.
  I have debuged the server code (<em>Controller</em>) and I can see the changed values (<em>in <code>Order</code> collection</em>) are sent to the Patch method in server, but not saved in database.</p>
  
  <p>Questions: </p>
  
  <ol>
  <li>How can I add new item to Orders collection?</li>
  <li>How can I modify a property in Orders collection?</li>
  <li>Should I use <code>DataServiceCollection&lt;Order&gt;</code> for track orders
  collection?</li>
  </ol>
  
  <p>Additional Information:
  I have created a master detail window in WPF and bonded the order collection to a <code>Datagdid</code>.</p>