// GET api/<controller>/5 public int Get(int id) { contactNo = id; if (AadharManager.GetByContactNo(id)) { Random r = new Random(); otp = r.Next(1000, 9999); //This otp is sent to contact number also but how I didn't get that } return otp; }