title: Blazor checkbox onchange event with parameter
body: <p>The following code works for me:</p>
  
  <pre><code>@if (data == null)
  {
      &lt;p&gt;&lt;em&gt;Loading...&lt;/em&gt;&lt;/p&gt;
  }
  else
  {
      &lt;button class="btn btn-primary" @onclick="Save"&gt;Save all changes&lt;/button&gt;
  
      &lt;table class="table"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;Concern ID&lt;/th&gt;
                  &lt;th&gt;CDC&lt;/th&gt;
                  &lt;th&gt;Context&lt;/th&gt;
                  &lt;th&gt;Reporting&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              @foreach (var c in data)
              {
                  &lt;tr&gt;
                      &lt;td&gt;@c.ConcernId&lt;/td&gt;
                      &lt;td&gt;&lt;input type="checkbox" @bind="@c.PassingAllowed" /&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;input type="checkbox" @bind="@c.ContextPassingAllowed" /&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;input type="checkbox" @bind="@c.ReportingPassingAllowed" /&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              }
          &lt;/tbody&gt;
      &lt;/table&gt;
  }
  
  @code{
      private ConcernData[] data;  
  
      protected override async Task OnInitializedAsync()
      {
          await GetData().ConfigureAwait(false);
      }
  
      private async Task GetData()
      {
          data = await Http.GetFromJsonAsync&lt;ConcernData[]&gt;("ConcernFilter").ConfigureAwait(false);
      }
  
      private async Task Save()
      {
          await Http.PostAsJsonAsync&lt;ConcernData[]&gt;("ConcernFilter/Update", data).ConfigureAwait(false);
      }
  
      private async Task Update(int concernId)
      {
          Console.Write(concernId);
      }
  }
  </code></pre>
  
  <p>However this sends over all the data (changed and unchanged) back to the server where I need to figure out (or simply update one by one) which data needs an update in the databases.</p>
  
  <p>It doesn't feel right as I'm sending too much data over the wire and sending too many update statements to the databases (3 in this case). </p>
  
  <p>I can think of several way to tackle this:</p>
  
  <ol>
  <li>on the client compare the altered list with an original list and only send the items to the server that really need an update.</li>
  <li>find a way to write in Blazor for a checkbox in such a list how to call the Update method and passing the correct concernId as a parameter.</li>
  </ol>
  
  <p>I'm looking for help to accomplish option 2.</p>