Wednesday, 17 July 2024

get ooutput result for foreach loop save

  public async Task<bool> BulkMovetoCompletedFiles(List<tbl_ScanedFiles> files)

 {

     try

     {

         bool result = false;

         List<bool> responseResult = new List<bool>();


         if (files.Count > 0)

         {

             foreach (var item in files)

             {

                 responseResult.Add(await MovetoCompletedFiles(item.FileName, item.DivisionName, item.CountryName));

             }


             if (responseResult.All(x => x == true))

             {

                 result = true;

             }

         }


         return result;

     }

     catch (Exception ex)

     {

         throw ex;

     }

 }

No comments:

Post a Comment

HCL healthcare

 hcl health care f2f second round interview asked more uestions on microservice 1.apim manage all apis in one place 2.sql profiler in one fo...