public IActionResult GetAccounts()
 {
     if (ModelState.IsValid)
     {
         SingleResponse <List <Account> > response = new SingleResponse <List <Account> >();
         response.ResultCode = ResultCodes.normal;
         response.Result     = _xbService.GetAccounts();
         Parallel.ForEach(response.Result, x => x.HasContractFile = _xbService.HasUploadedContract(x.AccountNumber, 3));
         Parallel.ForEach(response.Result, m =>
         {
             if (m.AccountType == 11)
             {
                 m.ArcaBalance = _xbService.GetArcaBalance(m.AccountDescription.Substring(0, 16).Trim());
                 if (m.AccountNumber == "220000295380000" && Convert.ToBoolean(_config["TestVersion"]))
                 {
                     m.ArcaBalance = null;
                 }
             }
         });
         return(ResponseExtensions.ToHttpResponse(response));
     }
     else
     {
         return(ValidationError.GetValidationErrorResponse(ModelState));
     }
 }