title: Bind /action/1,2,3 to List<int>
body: <p>In my API, I'd like to have routes like <code>GET /api/v1/widgets/1,2,3</code> and <code>GET /api/v1/widgets/best-widget,major-widget,bob-the-widget</code></p>
  
  <pre><code>public class WidgetsController : MyApiController
  {
      public ActionResult Show(IEnumerable&lt;int&gt; ids)
      {
  
      }
  
      public ActionResult Show(IEnumerable&lt;string&gt; names)
      {
  
      }
  }
  </code></pre>
  
  <p>I've got routes set up to get me to the action, but I can't figure out how to turn <code>1,2,3</code> into <code>new List&lt;int&gt;(){1, 2, 3}</code> and so on. Of course, I could just take a <code>string</code> and parse it in my action, but I'd like to avoid going that route.</p>
  
  <p>One thing that came to mind was to put something in the <code>OnActionExecuting</code> method, but then I wasn't sure exactly what to put in there (I could hack something together, obviously, but I'm trying to write something reusable.) </p>
  
  <p>The main questions I have are how to know whether I need to do anything at all (sometimes the ValueProviders upstream will have figured everything out), and how to handle figuring out the type to cast to (e.g., how do I know that in this case I need to go to a collection of ints, or a collection of strings, and then how do I do that?)</p>
  
  <p>By the way, I had the idea of implementing a <code>ValueProvider</code> as well, but got lost on similar questions.</p>