Esempio n. 1
0
        public void WriteReferenceData()
        {
            var destinationFile = Path.Combine(ConfigurationManager.AppSettings["DataDirectory"], "RegionReferenceData.csv");

            using (_referenceDataWriter = new CsvWriter(new StreamWriter(destinationFile)))
            {
                _referenceDataWriter.WriteHeader <PostcodeReferenceData>();
                foreach (var pair in _postcodeToRegionMap)
                {
                    _referenceDataWriter.WriteRecord(new PostcodeReferenceData(pair.Key, pair.Value));
                }
            }
        }
Esempio n. 2
0
        public void WriteReferenceData()
        {
            var destinationFile = Path.Combine(ConfigurationManager.AppSettings["DataDirectory"], "LocationReferenceData.csv");

            using (_referenceDataWriter = new CsvWriter(new StreamWriter(destinationFile)))
            {
                _referenceDataWriter.WriteHeader <LocationReferenceData>();

                foreach (var row in _practiceToPostcodeMap)
                {
                    _referenceDataWriter.WriteRecord(new LocationReferenceData(row.Item1, row.Item2));
                }
            }
        }
        public void WriteReferenceData()
        {
            var destinationFile = Path.Combine(ConfigurationManager.AppSettings["DataDirectory"],
                                               ConfigurationManager.AppSettings["AddressReferenceData"]);

            using (_referenceDataWriter =
                       new CsvWriter(new StreamWriter(destinationFile)))
            {
                _referenceDataWriter.WriteHeader <AddressReferenceDataRow>();
                foreach (var row in _practicesToPostcodeMap)
                {
                    _referenceDataWriter.WriteRecord(new AddressReferenceDataRow(row.Key, row.Value));
                }
            }
        }