title: How to call action result return json on another action result on asp.net core 2.2?
body: <p>Problem</p>
  
  <p>How to call Action Result on another Action Result ?</p>
  
  <p>I have two Action Result PostUserLogins and Action Result GetBranches</p>
  
  <p>Can I call ActionResult getbranches inside ActionResult postlogin ?</p>
  
  <pre><code>[HttpPost(Contracts.ApiRoutes.Login.UserLogin)]
          public IActionResult PostUserLogins([FromBody] Users user)
          {
  if (LoginStatus == 1)
              {
                  // for Invalid Username Or password
                  dynamic request_status = new JObject();
                  request_status.Status = "failed";
                  request_status.Code = LoginStatus;
                  request_status.Message = errorMessage;
                  request_status.Branches = ????? How to call GetBranches Action;
                 // call action result to get  GetBranches(Users user) as json;
                  JsonResults = "request_status" + JsonConvert.SerializeObject(request_status);
  
  
          }
  
          }
   [HttpGet(Contracts.ApiRoutes.Login.GetBranches)]
          public IActionResult GetBranches([FromRoute] string UserId)
          {
  
  
   List&lt;Branches&gt; branchesList = new List&lt;Branches&gt;();
                  for (int i = 0; i &lt; dtBranches.Rows.Count; i++)
                  {
                      Branches branch = new Branches();
                      branch.BranchCode = Utilities.ObjectConverter.ConvertToInteger(dtBranches.Rows[i]["BranchCode"]);
                      branch.BranchName = Utilities.ObjectConverter.ConvertToString(dtBranches.Rows[i]["BranchAraName"]);
                      branchesList.Add(branch);
  
              }
  JsonResults = "request_status" + JsonConvert.SerializeObject(branchesList);
  return Ok(JsonResults);
          }
  </code></pre>