title: Blazor: binding to a MultiSelectList (ideally with a checkbox)
body: <p>Experimenting with Blazor (Server, if that makes any difference), and I'm having difficulty getting binding to a MultiSelectList to work....</p>
  
  <p>Bit of background: I'm dealing with EF Core and have a Many-to-Many relationship, let's say between people and cars.  I'm currently loading a page that shows the existing details, and allowing the user to update this page.</p>
  
  <p>So in my Service, I load my Person entity from the DB, and this includes the details of all the cars they currently own.  I also load the list of all the available cars.  My Service method then creates a MultiSelectList and adds it to my ViewModel (to be returned to the Razor Page):</p>
  
  <p><strong>Service method</strong></p>
  
  <pre><code>vm.CarSelector = new MultiSelectList(
       allCars,
       nameof(Car.CarId), 
       nameof(Car.Name), 
       person.OwnedCars.Select(oc =&gt; oc.CarId));
  </code></pre>
  
  <p>This is fictitious code, but I hope you get the picture.  When debugging this (in the Service method) I can see that this MultiSelectList has an entry for every car, and the ones that are already selected are showing as Selected.  Great!</p>
  
  <p><strong>Blazor Razor Page</strong></p>
  
  <p>So, this is where I come unstuck....  I can't work out how to do the two-way data-binding of a Razor control to this object.  </p>
  
  <ul>
  <li>I'm trying to use an &lt;InputSelect /&gt;, but that might not be the best control to use.  </li>
  <li>ideally (actually, that's more of a "must have"), each option should have CheckBox.</li>
  <li>I'm wondering whether the use of a MultiSelectList really buys me anything</li>
  </ul>