title: How to pass parameters to array class in webapi?
body: <p>I am new to asp.net mvc webapi.I am create one webapi service.In this service  I am sending parameter as an array class.</p>
  
  <p>Below is my service :</p>
  
  <pre><code>[AcceptVerbs("GET", "POST")]
  public HttpResponseMessage addBusOrder(string UserUniqueID, int PlatFormID,
                                         string DeviceID, int RouteScheduleId,
                                         string JourneyDate, int FromCityid,
                                         int ToCityid, int TyPickUpID,
                                         Contactinfo Contactinfo, passenger[] pass)
  {
      //done some work here
  }
  
  public class Contactinfo
  {
      public string Name { get; set; }
      public string Email { get; set; }
      public string Phoneno { get; set; }
      public string mobile { get; set; }
  }
  
  public class passenger
  {
      public string passengerName { get; set; }
      public string Age { get; set; }
      public string Fare { get; set; }
      public string Gender { get; set; }
      public string Seatno { get; set; }
      //public string Seattype { get; set; }
      // public bool Isacseat { get; set; }
  }
  </code></pre>
  
  <p>Now how to pass <code>passenger</code> and <code>contactinfo</code>  parameters to the above service.</p>
  
  <p>Is there any changes in webapiconfig file?
   i want to pass passenger details like this:</p>
  
  <pre><code>passengername="pavan",
  age="23",
  Gender="M",
  
  passengername="kumar",
  Gender="M",
  Age="22
  </code></pre>