title: Edit action in controller not updating
body: <p>When I edit an item and return to the index view the item doesn't show what I updated it to.</p>
  
  <p>I think I know what the problem is but not sure how to fix it. In my service class I have a CreateEditItem method and when I step thru the code it hits the if condition &lt;=0. So it acts like there is an id of 0 when I click the submit button to submit my update. I'm not sure what to do to fix this. Do I need to have a separate method for Edit? And if so what should that look like?</p>
  
  <pre><code>  public bool CreateEditItem(Item item)
      {
  
          if (item.ItemId &lt;= 0)
          {
              var maxId = _mockList.Max(p =&gt; p.ItemId);
              item.ItemId = maxId + 1;
  
              _mockList.Add(item);
              return true;
          }
  
  
          var itemToEdit = _mockList.FirstOrDefault(p =&gt; p.ItemId == 
          item.ItemId);
  
          itemToEdit = item;
          return true;
  
      }
  </code></pre>
  
  <p>Action in Controller</p>
  
  <pre><code>   [HttpPost]
      public IActionResult EditItem(Item itemToEdit)
      {
          _itemService.CreateEditItem(itemToEdit);
  
          return RedirectToAction(nameof(Index), new { id = 
         itemToEdit.ItemId });
      }
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>        &lt;div class="row"&gt;
                  &lt;form asp-action="EditItem"&gt;
                      &lt;div asp-validation-summary="ModelOnly" class="text- 
              danger"&gt;&lt;/div&gt;
                      &lt;div class="container form-group"&gt;
  
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-2"&gt;As Of : &lt;label 
             for="AsOf" /&gt;&lt;/div&gt;
                              &lt;div class="col-md-4"&gt;&lt;input id="AsOf" 
           value="@Model.ItemToEdit.AsOf" name="AsOf" type="date" /&gt;&lt;/div&gt;
                          &lt;/div&gt;
  
                          &lt;br /&gt;
  
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-2"&gt;Title Summary : &lt;label 
             for="TitleSummary" /&gt;&lt;/div&gt;
                              &lt;div class="col-md-2"&gt;&lt;input id="TitleSummary" 
           value="@Model.ItemToEdit.Title" name="Title" type="text" /&gt;&lt;/div&gt;
                          &lt;/div&gt;                        
  
                          &lt;br /&gt;
                          &lt;br /&gt;
  
                          &lt;div class="row"&gt;
                              &lt;div class="col-md-2"&gt;&lt;input type="submit" 
                      value="Submit" class="btn btn-primary" /&gt;&lt;/div&gt;                               
                          &lt;/div&gt;
                      &lt;/div&gt;
  
                  &lt;/form&gt;
              &lt;/div&gt;
  </code></pre>
  
  <p>I expect when I click the submit button to submit my update it will show the updated Title and/or AsOf date.</p>