title: How to pass a optional parameter into ActionResult
body: <p>This works:</p>
  
  <pre><code>public ActionResult Edit(int id, CompPhone cmpPhn)
  {
    var vM = new MyViewModel();
    if (cmpPhn != null) { vM.CmpPhnF = cmpPhn; }
    ...
  }
  </code></pre>
  
  <p>If I make cmpPhn optional:</p>
  
  <pre><code>public ActionResult Edit(int id, CompPhone? cmpPhn)
  </code></pre>
  
  <p>I get "Error 1 The type 'MyProject.Models.CompPhone' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable'.</p>
  
  <p>How can I make this input parameter to the method optional?</p>
  
  <p>Here's the view model</p>
  
  <pre><code>public class MyViewModel : IValidatableObject
  {
  ...
  public CompPhone CmpPhnF { get; set; }    
  ...
  }
  </code></pre>
  
  <p>Calling method</p>
  
  <pre><code>[HttpPost, ValidateAntiForgeryToken]
  public ActionResult PhoneTest(MyViewModel vM)
  {
    if (ModelState.IsValid)
    { var cmpPhn = vM.CmpPhnF;
    return RedirectToAction("Edit", new { id = vM.AcntId, cmpPhn });
    }
    ...
  }
  </code></pre>