public decimal GetUpdateTimeStatisticsAddRangeWithDbContextRecycle(bool useDbSetToSave)
        {
            var fifteenThousandAddressWithoutId = MakeFifteenThousandAddress(generateIncrementalId: false);

            var amazonAddressInsertLabMapper = new AmazonAddressInsertLabMapper();
            var amazonAddressUpdateLabMapper = new AmazonAddressUpdateLabMapper();
            var fiveThousandUpdatesTimes     = new List <decimal>();

            using (var amazonCodeFirstContext = new AmazonCodeFirstDbContext())
            {
                amazonAddressInsertLabMapper.CleanAddressData(amazonCodeFirstContext);
            }

            amazonAddressInsertLabMapper.InsertAddressWithDbSetWithAddRange(fifteenThousandAddressWithoutId);

            for (int i = 0; i < 3; i++)
            {
                var fiveThousandAddress = MakeFiveThousandAddress((i * 5000) + 4);

                using (var amazonCodeFirstContext = new AmazonCodeFirstDbContext())
                {
                    var fiveThousandUpdateTime = useDbSetToSave
                                                 ? amazonAddressUpdateLabMapper.UpdateAddressWithDbSetWithAddRange(amazonCodeFirstContext, fiveThousandAddress)
                                                 : amazonAddressUpdateLabMapper.UpdateAddressWithDbContextWithAddRange(amazonCodeFirstContext, fiveThousandAddress);

                    fiveThousandUpdatesTimes.Add(fiveThousandUpdateTime);
                }
            }

            var fiveThousandUpdateTimeAverage = Enumerable.Average(fiveThousandUpdatesTimes);
            var insertTime = decimal.Divide(fiveThousandUpdateTimeAverage, 5_000);

            return(insertTime);
        }
        public decimal GetUpdateTimeStatisticsAddRange(bool useDbSetToSave)
        {
            var fifteenThousandAddressWithoutId = MakeFifteenThousandAddress(generateIncrementalId: false);
            var fifteenThousandAddress          = MakeFifteenThousandAddress(generateIncrementalId: true);

            var amazonAddressInsertLabMapper = new AmazonAddressInsertLabMapper();
            var amazonAddressUpdateLabMapper = new AmazonAddressUpdateLabMapper();

            using (var amazonCodeFirstContext = new AmazonCodeFirstDbContext())
            {
                amazonAddressInsertLabMapper.CleanAddressData(amazonCodeFirstContext);
                amazonAddressInsertLabMapper.InsertAddressWithDbSetWithAddRange(fifteenThousandAddressWithoutId);

                var updateTimeAllRecords = useDbSetToSave
                                           ? amazonAddressUpdateLabMapper.UpdateAddressWithDbSetWithAddRange(fifteenThousandAddress)
                                           : amazonAddressUpdateLabMapper.UpdateAddressWithDbContextWithAddRange(fifteenThousandAddress);

                var updateTime = decimal.Divide(updateTimeAllRecords, fifteenThousandAddress.Count());

                return(updateTime);
            }
        }