Are list parameters supported in OpenRasta? how they should be sent?

220 views Asked by At

If I have a resource handler method receiving an object list as parameter (int list, string list or any object type list), i.e.:

 public class TasksCollecionHandler 
    { 
        public TaskCollection GetTasksByEngineer(List<int> engineerIds) 
        { 
            .... 
        } 
        public TaskCollecion GetTasksByEngineer(List<Engineer> engineers) 
        { 
           .... 
        } 
    } 
  1. Is OpenRasta supporting this kind of arguments?
  2. How the HTTP request including values for kind of arguments should look like?
1

There are 1 answers

2
SerialSeb On

Depends on the codec. Using json or xml data contracts it'd be whatever format the datacontract mapping follows.

If you use forms and html, the format would be

engineers:0.FirstName=john&engineers:0.LastName=doe&engineers:1.FirstName=other