title: How to pass query string parameter to asp.net web api 2
body: <p>How can I pass more than 1 parameters as part of query string to my asp.net web api 2.</p>
  
  <p>This is my asp.net web api 2 method, I am not able to figure out that how can I decorate this method so that it accepts the id and a complex type which is CustomerRequest, I want to use Url something like </p>
  
  <blockquote>
    <p><code>http://localhost/api/Customer/?Mobile0012565987&amp;Email=abcxyz.com&amp;IsEmailVerified=true</code></p>
  </blockquote>
  
  <pre><code>[ResponseType(typeof(Customer))]
  public IHttpActionResult GetCustomer(long id, [FromUri]CustomerRequest request)
          {
              var customer = db.Customers.Find(request.CustomerId);
  
              if (customer == null)
              {
                  return NotFound();
              }
  
              return Ok(customer);
          }
  </code></pre>
  
  <p>This is CustomerRequest class</p>
  
  <pre><code>  public class CustomerRequest
      {
          public string Mobile { get; set; }
          public string Email { get; set; }         
          public Nullable&lt;bool&gt; IsEmailVerified { get; set; }    
      }
  </code></pre>
  
  <p>Otherwise pleaase guide me if there is a better way to do it.</p>
  
  <p>Thanks</p>