filipw / Strathweb.Samples.AspNetCore.QueryStringBinding

MIT License
24 stars 9 forks source link

Handle multiple parameters with CommaSeparated attribute #2

Open derekpuff opened 6 years ago

derekpuff commented 6 years ago

Thank you for this excellent approach to handling the query string. I found that it does not correctly handle a query string with multiple parameters that have comma-separated values.

GET /products?sizes=s,m,l&colors=blue,green

[HttpGet("Products")] public IActionResult Get( [CommaSeparated]IEnumerable<string> sizes, [CommaSeparated]IEnumerable<string> colors, string filterText)

Presumably the fix involves having the various classes (the factory and provider) maintain an enumeration of keys. Thanks!

chriscab83 commented 6 years ago

I just created a pull request for the handling of multiple comma-separated values.