title: how to pass a argument with HTTP get method in .net core web api?
body: <p>I'm trying to build a simple web api using .net core web api which will do basic mathematics operations. I have written controller part which consists of multiple get methods when it is called it returns the value with the operation performed.
  controller code </p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Threading.Tasks;
  using Microsoft.AspNetCore.Mvc;
  
  namespace Calculation.Controllers
  {
      [Route("api/[controller]")]
      public class MathController : Controller
      {
          [HttpGet("Add")]
          public int Add(int value1, int value2)
          {
              return value1 + value2;
          }
          [HttpGet("Subtract")]
          public int Substract(int value1, int value2)
          {
              return value1 - value2;
          }
          [HttpGet("Multiply")]
          public int Multiply(int value1, int value2)
          {
              return value1 * value2;
          }
          [HttpGet("Division")]
          public int Division(int value1, int value2)
          {
              return value1 / value2;
          }
      }
  }
  </code></pre>
  
  <p>so how can I Pass the argument values with the api  so it return the value of mathematical operation. like if I go to <a href="https://localhost:44309/api/math/add/" rel="nofollow noreferrer">https://localhost:44309/api/math/add/</a>{{argument values value1 and value 2 say 25 and 25}} it will return 50
  likewise <a href="https://localhost:44309/api/math/subtract/" rel="nofollow noreferrer">https://localhost:44309/api/math/subtract/</a>{{argument values value1 and value 2 say 25 and 25}} it will return 0 </p>