title: POSTing a new entity with a navigation property
body: <p>I'm struggling to find an example of how to create (POST) a new entity to an OData v4 service when there is a navigation property involved. </p>
  
  <p>For example, let's say I have the following two models:</p>
  
  <pre><code>class Item
  { 
      [Key]
      public int Id { get; set; }
  
      [Required]
      public string Name { get; set; }
  
      [Required]
      public virtual Group Group { get; set;}
  }
  
  class Group
  {
      [Key]
      public int Id { get; set; }
  
      [Required]
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>If I want to create an Item which should belong to an already-defined group (with, let's say, ID = 123), then I'll POST:</p>
  
  <pre><code>{
    "Name": "New item",
    "Group": ???
  }
  </code></pre>
  
  <p>What do I need to specify for group? I'm assuming I need to refer to it by the ID somehow. Of course, I could include the foreign key in the Item entity (GroupId) and add that. That's how I'm doing it at the moment, and it works, but is this the only way to go? What <em>should</em> I be doing? Thanks.</p>