title: Posting a collection of subclasses
body: <p>I have a requirement for users to edit a list of quotes for a lead, the quotes can be different types such as:</p>
  
  <ul>
  <li>QuoteForProductTypeA </li>
  <li>QuoteForProductTypeB</li>
  </ul>
  
  <p>All quote types share a common base class, such as QuoteBase.</p>
  
  <p>I have my quotes displaying fine on the front end, and appear to post back the correct data  too.</p>
  
  <p>However, on the server it doesn't obviously doesn't know which subclass to use, so just uses the base class.</p>
  
  <p>I think i need some kind of custom model binder for WebApi to check for a hidden field such as ModelType which contains the type of the object in the collection, the model binder then creates a new object of this type and binds the properties from my posted values to this object.</p>
  
  <p>However, i am stuck at this point with very little documentation / blogs on how to do this.</p>
  
  <p>I have checked the source code for WebApi to see if i can extend a default model binder, but any defaults are sealed classes.</p>
  
  <p>I can only implement IModelBinder by the looks of it, i can create the correct model type by looking for a value called ModelType, but then i'm not sure how to fill the rest of the values in my subclasses, if there was a default model binder i was inheriting from i would just call the base classes bind method.</p>