title: Issue with TryUpdateModel in MVC3
body: <p>I have a problem with a TryUpdateModel in MVC3</p>
  
  <p>When the Edit (post) is fired, I have the following code:</p>
  
  <pre><code>    public ActionResult Edit(int id, FormCollection collection)
      {
          var review = FoodDB.FindByID(id);
          if (TryUpdateModel(review))
              return RedirectToAction("Index");
          return View(review);
      }
  </code></pre>
  
  <p>The view is built directly by the VS (so not changed by me)
  If I trace the code, I see the new values in FormCollection, but after executing TryUpdateModel, it returns true, doesn't throw any error, but the review object isn't updated.</p>
  
  <p>What could I do wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I come up with some more details:
  First, the db is not real DB, but just a "simulation" - class with one static genric List</p>
  
  <pre><code>List&lt;Review&gt; Review;  
  </code></pre>
  
  <p>Review class is simply a POCO, as below:</p>
  
  <pre><code>public class Review
  {
      public string Message { get; set; }
      public DateTime Created { get; set; }
      public int ID { get; set; }
      public int Rating { get; set; }
  }
  </code></pre>
  
  <p>The view is strong-typed, generated by VS from the Edit method of the controller. Fields are defined as below:</p>
  
  <pre><code>    &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.Message)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.Message)
          @Html.ValidationMessageFor(model =&gt; model.Message)
      &lt;/div&gt;       
  
      @Html.HiddenFor(model =&gt; model.ID)
  
      &lt;div class="editor-label"&gt;
          @Html.LabelFor(model =&gt; model.Rating)
      &lt;/div&gt;
      &lt;div class="editor-field"&gt;
          @Html.EditorFor(model =&gt; model.Rating)
          @Html.ValidationMessageFor(model =&gt; model.Rating)
      &lt;/div&gt;
  </code></pre>
  
  <p>Call to <code>var review = FoodDB.FindByID(id);</code> returns Review object</p>
  
  <p>Even if <code>TryUpdateModel(review)</code> does not work (I trace through code, and I inspected review object before and after the call, as well as the <code>collection</code>, and it receives correct values), yet the <code>review</code> obj is not updated.</p>
  
  <p>However, I replaced it with my own hand-written method, as below, and in this case the review object DOES get updated:</p>
  
  <pre><code>    private void MyTryUpdateModel(Review review, FormCollection collection)
      {
          review.Message = collection["Message"];
          review.Rating = int.Parse(collection["Rating"]); 
      }   
  </code></pre>
  
  <p>So the TryUpdateMethod SHOULD find proper fields in collection for updating, as I understand.</p>
  
  <p>So, what can be wrong?</p>
  
  <p>Thanks all</p>