In my API model binder get request I want to convert a comma separated string that is passed through the get request to a list. I want to only do it for once of the properties in my model so IModelBinder would not be the best to use, maybe a TypeConverter?
How would I go about doing this?
Some of you seem confused regarding m vague question. I want to add mapping within the http middleware not after the api call has been made. There are numerous approaches such as the itypeconverter, action filter. This means i will have to call the method over and over.
So if I have a API call called
public IActionResult getUserConfigs(List<string>UserIds, list<int> permmisionIds)
They send in a request e.g. UserIds=1,2,3,4,5, how do I plug in a middleware component to map the string to a list.
This needs to work in a dot net core project.