title: Updating the original reference to an object that was returned from a linq query
body: <p>I would like to do something like this:</p>
  
  <pre><code>[HttpPost]
  public JsonResult Submit(Person UpdatedPerson)
  {
      //Find the original Person that the model was bound against
      //Update the collection's reference to reflect the changes
      //from the posted model version
      Person original = PersonCollection
                          .SingleOrDefault(p=&gt;p.Id == UpdatedPerson.Id);
      if(original!=null)
      {
          //update the value from PersonCollection
          //doesn't work, of course
          original = UpdatedPerson;
      }
  }
  </code></pre>
  
  <p>I'm currently doing this:</p>
  
  <pre><code>[HttpPost]
  public JsonResult Submit(Person UpdatedPerson)
  {
      //Find the index into PersonCollection for the original 
      //model bound object, use the index to directly mutate the 
      //PersonCollection collection
      int refIndex = -1;
      for(int i=0;i&lt;PersonCollection.Length;i++)
      {
          if(PersonCollection[i].Id == UpdatedPerson.Id)
          {
              refIndex = i;
              break;
          }
      }
      if(refIndex &gt;= 0)
      {
          PersonCollection[refIndex] = UpdatedPerson;
      }
  }
  </code></pre>
  
  <p>It feels like I'm missing something simple here, it shouldn't be so much trouble to accomplish what I'm after.</p>
  
  <p>What is the best practice way to do this sort of stuff?</p>