I have some dynamic querystring parameters that I would like to interact with as an IDictionary<string,string>
. How do I do this?
I tried
public IHttpActionResult Get(FromUri]IDictionary<string, string> selections)
as suggested but for a query of
/api/MyController?selections%5Bsub-category%5D=kellogs
it always gives me a dictionary with 0 items.
I don't even need the selections
prefix. I literally just need all querystring parameters as a dictionary. How do I do this and why won't the above work?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…