title: Entity Framework SaveChangesAsync Not Updating Database
body: <p><strong>Invoice Category Entity:</strong></p>
  
  <pre><code>public class InvoiceCategory
  {     
      [Key]
      Public int InvoiceCategoryID { get; set; }
  
      [Required]
      public string CategoryName { get; set; }
  }
  </code></pre>
  
  <p><strong>Invoice Item Entity</strong></p>
  
  <pre><code>public class InvoiceItem
  {
      [Key]
      public int InvoiceItemID { get; set; }
  
      [Required]
      public int InvoiceID { get; set; }   
  
      [Required]
      [Display(Name = "Date Completed")]
      [DataType(DataType.Date)] 
      public DateTime? Date { get; set; }
  
      [StringLength(50)]
      public string InvoiceCategory { get; set; }  
  
      [Required]
      [StringLength(200)]
      public string Description { get; set; }
  
      [Required]
      [StringLength(20)]
      public string Unit { get; set; }     
  
      [Required]
      [DataType(DataType.Currency)]
      [DisplayFormat(ApplyFormatInEditMode = false, DataFormatString = "{0:c}")]
      public decimal Price { get; set; }
  
      [Required]
      [DefaultValue(1)]
      public decimal? Quantity { get; set; }
  
      public virtual Invoice Invoice { get; set; }       
  }
  </code></pre>
  
  <p><strong>Invoice Category Edit View</strong></p>
  
  <pre><code>@model Accounts.Models.InvoiceCategory
  &lt;h2&gt;Settings&lt;/h2&gt;
  &lt;br /&gt;
  &lt;h4&gt;Invoice Categories&lt;/h4&gt;
  &lt;hr /&gt;
  &lt;form asp-action="Edit"&gt;
      &lt;div asp-validation-summary="ModelOnly" class="text-danger"&gt;&lt;/div&gt;
      @(Html.Kendo().Grid&lt;Accounts.Models.InvoiceCategory&gt;()
                .Name("InvoiceCategory")
                .ToolBar(tools =&gt;
                {
                    tools.Create().Text("New Category");
                })
                .Editable(editable =&gt; editable.Mode(GridEditMode.InCell).CreateAt(GridInsertRowPosition.Bottom).DisplayDeleteConfirmation(false))
                .Columns(columns =&gt;
                {
                    columns.Bound(p =&gt; p.InvoiceCategoryID).Hidden().ClientTemplate("#= InvoiceCategoryID #" +
                      "&lt;input type='hidden' name='[#= index(data)#].InvoiceCategoryID' value='#= InvoiceCategoryID #'/&gt;"
                    );
  
                    columns.Bound(p =&gt; p.CategoryName).ClientTemplate("#= CategoryName #" +
                      "&lt;input type='hidden' name='[#= index(data)#].CategoryName' value='#= CategoryName #'/&gt;"
                    );
                    columns.Template("&lt;a class='btn btn-danger btn-sm k-grid-delete'&gt;&lt;span class='glyphicon glyphicon-trash'&gt;&lt;/span&gt; &lt;/a&gt;").Width(50);
                })
                .DataSource(dataSource =&gt; dataSource.Ajax()
                     .Model(model =&gt;
                     {
                         model.Id(p =&gt; p.InvoiceCategoryID);
                         model.Field(p =&gt; p.InvoiceCategoryID).Editable(false);
                     })
                     .Read(read =&gt; read.Action("InvoiceCategories_Read", "Settings"))                       
                     .ServerOperation(false)
                ).Deferred()
      )
      &lt;br /&gt;
      &lt;button type="submit" class="btn btn-success"&gt;&lt;span class="glyphicon glyphicon-floppy-disk" style="vertical-align:middle;margin-top:-5px"&gt;&lt;/span&gt; Save&lt;/button&gt;
  &lt;/form&gt;
  @section Scripts {
      @Html.Kendo().DeferredScripts()
  
      &lt;script&gt;
          function index(dataItem) {
              var data = $("#InvoiceCategory").data("kendoGrid").dataSource.data();
              return data.indexOf(dataItem);
          }
      &lt;/script&gt;
  
      &lt;style&gt;
          .k-grid {
              width: 280px;
          }
      &lt;/style&gt;
  }
  </code></pre>
  
  <p><strong>Controller Invoice Category Update Method:</strong></p>
  
  <pre><code>[HttpPost]
  [ValidateAntiForgeryToken]
  public async Task&lt;IActionResult&gt; Edit(IEnumerable&lt;InvoiceCategory&gt; invoiceCategory)
  {
      if (ModelState.IsValid)
      {
          try
          {
              _context.InvoiceCategory.UpdateRange(invoiceCategory);
              _context.SaveChangesAsync();
          }
          catch (Exception ex)
          {
             ...
          }
      }
  }
  </code></pre>
  
  <p>The values are being changed in the view and the changes are being sent to the Edit method of the controller however the changes are not promulgated to the database for some reason with the save method.  </p>
  
  <p>Can Entity framework not support a lookup table with no integer identity column like I have?  Or am I doing something stupid?</p>