title: How to pass model values in a parameter
body: <p>I want to pass values using model as parameter.
  This is basically the mvc web api app</p>
  
  <p><strong>This is my Model class</strong></p>
  
  <pre><code>public class ConversionModel
  {
      public double  value { get; set; }
      public int qty { get; set; }
      public double  result { get; set; }
      public string  from { get; set; }
      public string  to { get; set; }
  }
  </code></pre>
  
  <p><strong>This is My controller code</strong></p>
  
  <pre><code>[HttpGet]
  [Route("api/Conversion/Currency")]
  public double Currency(ConversionModel c)
  {
      return c.value;
  }
  </code></pre>
  
  <p><strong>And my url is</strong></p>
  
  <p><a href="http://localhost:5267/api/Conversion/Currency?value=123" rel="nofollow noreferrer">http://localhost:5267/api/Conversion/Currency?value=123</a></p>
  
  <p>But is showing me an error </p>
  
  <blockquote>
    <p>Object reference not set to an instance of an object.</p>
  </blockquote>