title: Inheritance in action method parameters
body: <p>I have the following classes:</p>
  
  <pre><code>class SomethingBase 
  {
      public string SharedProperty { get; set; }
  }
  
  class ChildClassOne : SomethingBase 
  {
      public string SpecificPropertyOne { get; set; }
  }
  
  class ChildClassTwo : SomethingBase 
  {
      public string SpecificPropertyTwo { get; set; }
  }
  </code></pre>
  
  <p>And I have ASP.NET MVC View which has two HTML-forms. These forms are calling the same action method.
  This action method should receive any of two <code>SomethingBase</code> class derivatives.
  However, if I create single parameter like <code>SomethingBase param</code>, then only the <code>SharedProperty</code> is received. This behavior can be explained by binding mechanism of ASP.NET MVC.</p>
  
  <p>To make my action method work I created the next definition:</p>
  
  <pre><code>public ActionResult(ChildClassOne param1, ChildClassTwo param2)
  </code></pre>
  
  <p><code>SharedProperty</code> goes to both params, but specific properties are populated only for object, which was actually passed from view. It works, but I don't think that this is the only solution.</p>
  
  <p>Are there some best-practice solutions for this situation?</p>