title: How can I return an empty list instead of a null list from a ListBoxFor selection box in Asp.net MVC?
body: <p>controller get action</p>
  
  <pre><code>IList&lt;InputVoltage&gt; inputVoltagesList = unitOfWorkPds.InputVoltageRepository.GetAll.ToList();
  
  pdsEditViewModel.InputVoltageList = inputVoltagesList.Select(m =&gt; new SelectListItem { Text = m.Name, Value = m.Id.ToString() }); 
  </code></pre>
  
  <p>ViewModel</p>
  
  <pre><code>    public IEnumerable&lt;SelectListItem&gt; InputVoltageList { get; set; }
      public List&lt;int&gt; SelectedInputVoltages { get; set; }
  </code></pre>
  
  <p>View</p>
  
  <pre><code>    @Html.ListBoxFor(m =&gt; m.SelectedInputVoltages, Model.InputVoltageList)
  </code></pre>
  
  <p>I want to receive a null list when a user makes no selections the selectedInputvoltages comes into my post controller action as null how do I get it to come in as an empty list?</p>
  
  <p>I like both answers is there any benefit in using one over the other?</p>