public override void Handle(IBulkSalesAreaCreatedOrUpdated command)
        {
            ValidateSalesAreaDemographics(command);

            var customIds          = command.Data.Select(x => x.CustomId).ToList();
            var existingSalesAreas = _salesAreaRepository.FindByIds(customIds)
                                     .ToDictionary(x => x.CustomId);

            var salesAreasWithDemographics = new Dictionary <SalesArea, List <SalesAreaDemographic> >();
            var resultSalesAreas           = new List <SalesArea>();

            foreach (var item in command.Data)
            {
                var demographics = _mapper.Map <List <SalesAreaDemographic> >(item.Demographics);
                var newSalesArea = _mapper.Map <SalesArea>(item);

                if (existingSalesAreas.TryGetValue(item.CustomId, out SalesArea salesArea))
                {
                    UpdateSalesAreaModel(salesArea, newSalesArea);
                }
                else
                {
                    salesArea    = newSalesArea;
                    salesArea.Id = System.Guid.NewGuid();
                }

                resultSalesAreas.Add(salesArea);
                salesAreasWithDemographics.Add(salesArea, demographics);
            }

            _salesAreaRepository.Update(resultSalesAreas);
            UpdateSalesAreaDemographics(salesAreasWithDemographics);
            _salesAreaDemographicRepository.SaveChanges();
        }