Comma-separated parameter values in WebAPI
- đź“…
- đź“ť 627 words
- đź•™ 3 minutes
- 📦 Development
- 🏷️ ASP.NET, webdev, C#
- đź’¬ 1 response
The model binding mechanism in ASP.NET is pretty slick — it’s highly extensible and built on TypeDescriptor
TypeDescriptor for re-use that lets you avoid writing boilerplate code to map between CLR objects and their web representations.
One surprise, however, is that out of the box, neither WebAPI nor MVC support comma-separated parameter values when bound to an array, e.g.