Exemple #1
0
 internal static void ProcessingApartmentsUpdate(IOrganizationService orgSvc, List <SeltMapping> validateCollectionApartments, ILogger logger)
 {
     Parallel.ForEach(validateCollectionApartments, (apartment) =>
     {
         try
         {
             Entity entity = Requests.GetEstateObject(orgSvc, apartment.Apartment, apartment.BuildingId, apartment.CorpusNumber);
             if (entity != null)
             {
                 Requests.SettingEstateObject(orgSvc, entity, apartment.Apartment);
                 InstanceEntityUpdate.Entities.Add(entity);
             }
         }
         catch (Exception ex)
         {
             logger.Error(ex, "the element is not processed");
         }
     });
 }