title: Update an Entity with the Collection
body: <p>I'm having a problem to find a standard, how such an update would look like. I have this model (simplified). Bear in mind that <code>Team</code> is allowed without any player and <code>Team</code> can have up to 500 players:</p>
  
  <pre><code>public class Team
  {
      public int TeamId { get; set; }
      public string Name { get; set; }
      public string City { get; set; }
  
      public List&lt;Player&gt; Players { get; set; }
  }
  
  public class Player
  {
      public int PlayerId { get; set; }
      public string Name { get; set; }
      public int Age { get; set; }
  }
  </code></pre>
  
  <p>and this endpoints:</p>
  
  <ol>
  <li><p>Partial Team Update (without players): <code>[PATCH] /api/teams/{teamId}</code>. Offers me options to update particular fields of the team, but no players.</p></li>
  <li><p>Update Team (with players): <code>[PUT] /api/teams/{teamId}</code>. In payload data I pass <code>json</code> with entire <code>Team</code> object, including collection of players. </p></li>
  <li><p>Update Player alone: <code>[PUT] /api/teams/{teamId}/players/{playerId}</code></p></li>
  </ol>
  
  <p>I started wondering if I need endpoint #2 at all. The only advantage of endpoint #2 is that I can update many players in one request. I can delete or add many players at once, as well. So I started looking for any standard, how such a popular scenario is being handled in the real world?</p>
  
  <p>I have two options:</p>
  
  <ol>
  <li>Keep endpoint #2 to be able to update/add/remove many child records at the same time. </li>
  <li>Remove endpoint #2. Allow to change Team only via <code>PATCH</code> without ability to manipulate <code>Player</code> collection. <code>Player</code> collection can be changed only by endpoints:
  
  <ul>
  <li><code>[POST] /api/teams/{teamId}/players</code></li>
  <li><code>[PUT] /api/teams/{teamId}/players/{playerId}</code></li>
  <li><code>[DELETE] /api/teams/{teamId}/players/{playerId}</code></li>
  </ul></li>
  </ol>
  
  <p>Which option is a better practice? Is there a standard how to handle Entity with Collection situation? </p>
  
  <p>Thanks.</p>