Bind /action/1,2,3 to List<int>
问题 In my API, I'd like to have routes like GET /api/v1/widgets/1,2,3 and GET /api/v1/widgets/best-widget,major-widget,bob-the-widget public class WidgetsController : MyApiController { public ActionResult Show(IEnumerable<int> ids) { } public ActionResult Show(IEnumerable<string> names) { } } I've got routes set up to get me to the action, but I can't figure out how to turn 1,2,3 into new List<int>(){1, 2, 3} and so on. Of course, I could just take a string and parse it in my action, but I'd like