In my controller I have:
[AcceptVerbs("GET", "POST")]
public List<BuzzMonitor.Web.Message> Search(string text, DateTime dateFrom, DateTime dateTo, List<int> themeIds, List<int> sourceIds)
{...}
and I want to do model binding. It's easy for primitive types, but what to do when I have a list of primitive types?
I did it like this in Global.asax:
GlobalConfiguration.Configuration.Routes.MapHttpRoute("SearchWithParameters", "api/{controller}/{action}/{text}/{dateFrom}/{dateTo}/?/?"
But I dont know what to set for lists...
I found on some site that I can add [ModelBinder] before list, but when I do that I just get red underline on that word.
Does anyone have an idea how to do it?